Asp.net routing vs Url rewriting
2012-11-15 20:40
405 查看
ASP.NET routing differs from URL rewriting. URL rewriting processes incoming requests by actually changing the URL before it sends the request to the Web page. For example, an application that uses URL rewriting might change a URL from /Products/Widgets/ to /Products.aspx?id=4. Also, URL rewriting typically does not have an API for creating URLs that are based on your patterns. In URL rewriting, if you change a URL pattern, you must manually update all hyperlinks that contain the original URL.
With ASP.NET routing, the URL is not changed when an incoming request is handled, because routing can extract values from the URL. When you have to create a URL, you pass parameter values into a method that generates the URL for you. To change the URL pattern, you change it in one location, and all the links that you create in the application that are based on that pattern will automatically use the new pattern.
With ASP.NET routing, the URL is not changed when an incoming request is handled, because routing can extract values from the URL. When you have to create a URL, you pass parameter values into a method that generates the URL for you. To change the URL pattern, you change it in one location, and all the links that you create in the application that are based on that pattern will automatically use the new pattern.
相关文章推荐
- 艾伟_转载:IIS URL Rewriting 和 ASP.NET routing(上)
- IIS URL Rewriting and ASP.NET Routing
- IIS URL Rewriting 和 ASP.NET routing(下)
- IIS URL Rewriting 和 ASP.NET routing(上)
- IIS URL Rewriting 和 ASP.NET routing(下)
- 艾伟_转载:IIS URL Rewriting 和 ASP.NET routing(下)
- IIS URL Rewriting 和 ASP.NET routing(上)
- [转]URL Routing with ASP.NET 4 Web Forms (VS 2010 and .NET 4.0 Series)
- IIS URL Rewriting 和ASP.NET routing[转]
- IIS URL Rewriting 和 ASP.NET routing(上)
- IIS URL Rewriting 和 ASP.NET routing(下)
- UrlRewritingNet 完美实现 ASP.NET 2.0 中的URL重写(映射)
- Asp.net Mvc 请求是如何到达 MvcHandler的——UrlRoutingModule、MvcRouteHandler分析,并造个轮子
- UrlRewritingNet 完美实现 ASP.NET 2.0 中的URL重写(映射)
- UrlRewritingNet 完美实现 ASP.NET 2.0 中的URL重写(映射)
- 体验ASP.NET 4之URL Routing
- 《Pro ASP.NET MVC 3 Framework》学习笔记之十九【URL和Routing】
- 我要学ASP.NET MVC 3.0(三): 初识MVC的Url映射潜规则Routing
- URLRewriting for ASP.NET
- UrlRewritingNet 完美实现 ASP.NET 2.0 中的URL重写(映射) (转)