zoukankan      html  css  js  c++  java
  • Url重写

    protected void Application_BeginRequest(object sender, EventArgs e)
            {
                #region 重写显示章节列表路径
                //http://localhost:19826/Course/CourseController.ashx?action=chapter&courseid=2
                Match match = Regex.Match(Context.Request.Url.ToString(), @"/Course/CourseController_(chapter)(d+).ashx");
                if (match.Success)
                {
                    string chapter = match.Groups[1].Value;
                    string courseid = match.Groups[2].Value;
                    Context.RewritePath("/Course/CourseController.ashx?action=" + chapter + "&courseid=" + courseid);
                } 
                #endregion
    
            }
  • 相关阅读:
    UVA 1590 IP Networks
    UVA 12108
    HDUOJ 1042 N!
    UVA201 Squares
    UVaOJ 1339
    UVaOJ 202
    UVaOJ 100
    UVaOJ 10340
    第五章 跳跃表
    第四章 字典
  • 原文地址:https://www.cnblogs.com/adolphyang/p/4844625.html
Copyright © 2011-2022 走看看