Freigeben über


SYSK 246: User-Friendly URLs

Did you know that .NET 2.0 and later versions support URL mapping?

 

Say you have a page with several tabs… You can give virtual page name to each tab, but still have all the code implemented in one physical .aspx file. Or, if you have a page that displays different views of some data, but most of the code-behind logic is same, again, you can use the URL mapping functionality to make it look like it’s different pages to the end user… something that would be logical and easy to remember for them:

 

<system.web>

      <urlMappings enabed=”true”>

            <add url=”~/LogicalPage.aspx”

 mappedUrl=”~/RealPage.aspx?YourParam=SomeValue” />

      </urlMappings>

</system.web>

Comments

  • Anonymous
    November 22, 2006
    The comment has been removed
  • Anonymous
    November 25, 2006
    Je ne le connaissais pas ce truc là, que je viens de découvrir via Irena Kennedy : en .NET 2.0 on peut