zoukankan      html  css  js  c++  java
  • Asp.net routing vs Url rewriting

    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.

  • 相关阅读:
    新汉诺塔
    车的放置
    [NOI 2015]荷马史诗
    [JSOI2008]星球大战
    分组
    星空
    [Luogu4175][CTSC2008]网络管理Network
    [Luogu2617]Dynamic Rankings(整体二分)
    2018冬令营赛前停课总结
    [BZOJ2752][HAOI2012]高速公路
  • 原文地址:https://www.cnblogs.com/malaikuangren/p/2772215.html
Copyright © 2011-2022 走看看