How to modify URL to strip out the pathname and set it to the address bar?

Total Post:117

Points:821
C#  ASP.Net 
 1390  View(s)
Ratings:
Rate this:
How to modify URL to strip out the pathname and set it to the address bar
  1. Post:101

    Points:709
    Re: How to modify URL to strip out the pathname and set it to the address bar?

    You need to register routing in the global.asax file as per below:

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        RegisterRoutes(Routing.RouteTable.Routes)
    End Sub
     
    Public Shared Sub RegisterRoutes(ByVal routeCollection As Routing.RouteCollection)
        routeCollection.MapPageRoute("DefPage", "", "~/common/webpage/default.aspx")

      Modified On Apr-09-2018 01:20:45 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!