ASP.NET Web窗体应用程序中的URL路由和QueryStrings

问题描述:

我正在尝试为非MVC应用程序实现URL路由。这是我原来的网址:ASP.NET Web窗体应用程序中的URL路由和QueryStrings

http://mydomain.com/ProcessStuff.aspx?id=1029019 

http://mydomain.com/Process-This-Stuff/1029019 

我有困难时,页面中出现的URL查询字符串。

这是路由处理我到目前为止:

public class CustomRouteHandler : IRouteHandler 
{ 
    public IHttpHandler GetHttpHandler(RequestContext requestContext) 
    { 
     return BuildManager.CreateInstanceFromVirtualPath("ProcessStuff.aspx", typeof(Page)) as Page; 
    } 
} 

我相信“URL重写模块为IIS”,将解决你的问题,并为您节省大量的时间!

http://www.iis.net/expand/URLRewrite

http://learn.iis.net/page.aspx/460/using-url-rewrite-module/