摘要:
例如:http://www.baidu.com/view.aspx?id=1 和http://www.baidu.com/view-1.aspx 访问的页面相同;只需要全局应用程序类的Application_BeginRequest中添加如下代码:protectedvoidApplication_BeginRequest(objectsender,EventArgse){//使用正则表达式判断格式;View-12.aspxRegexreg=newRegex(@".+View-(\d+).aspx");//获取请求的路径进行匹配varmatch=reg.Match(Reque 阅读全文
摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.SessionState;namespace全局应用程序类Global应用{publicclassGlobal:System.Web.HttpApplication{protectedvoidApplication_Start(objectsender,EventArgse){//程序第一次运行;}protectedvoidSession_Start(objec 阅读全文
摘要:
一般处理程序代码:usingSystem;usingSystem.Web;usingAjax无刷新删除.DataSetDeleteDataTableAdapters;namespaceAjax无刷新删除{///<summary>///DeleteDataById的摘要说明///</summary>publicclassDeleteDataById:IHttpHandler{publicvoidProcessRequest(HttpContextcontext){context.Response.ContentType="text/plain";int 阅读全文