Appliction_BeginRequest
2012-04-27 12:22 cpine 阅读(196) 评论(0) 编辑 收藏 举报void Application_BeginRequest(object sender, EventArgs e) {
Regex reg = new Regex(@".+Thread-(\d+).html");
var match = reg.Match(HttpContext.Current.Request.Url.AbsolutePath);
if (match.Success) {
string gradeId = match.Groups[1].Value;
HttpContext.Current.RewritePath("ShowStudentInfo.aspx?gradeid=" + gradeId);
}
}
Regex reg = new Regex(@".+Thread-(\d+).html");
var match = reg.Match(HttpContext.Current.Request.Url.AbsolutePath);
if (match.Success) {
string gradeId = match.Groups[1].Value;
HttpContext.Current.RewritePath("ShowStudentInfo.aspx?gradeid=" + gradeId);
}
}