How To change URL name in Asp.net


            In this Tutorial can perform to change URL name in Asp.net Using urlMappings.for example  home.aspx in URL now we can change the URL name as Home in Using  the Asp.net Web.Cofig file .
Add <urlMappings> with  in the <configuration> <system.web> tag set Enabled true

      <urlMappings enabled="true">
     <add url="~/Home" mappedUrl="~/home.aspx" />
     <add url="~/Lessionplan" mappedUrl="~/lessonplan.aspx?mode=view" />
     <add url="~/Reports" mappedUrl="~/Report.aspx" />
   </urlMappings>

URL mapping enables developers to map one set of URL to other.For example you can map the URL so that URL
   http://localhost:60527/<Project Name>/home.aspx to http://localhost:60527/<project name>/Home   


Before UrlMappings

  url is:http://localhost:60527/<Project Name>/home.aspx



After Using UrlMappings

     Url is http://localhost:60527/<project name>/Home
      


Set Url Link<a href="home.aspx">Home</a> to  
<a href="Home">Home</a>

Comments

Popular posts from this blog

Insecure cookie setting: missing Secure flag

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Display Line Chart Using Chart.js MVC C#