Asp.net routing vs URL rewriting

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.