HOW TO MODIFY URL TO STRIP OUT THE PATHNAME AND SET IT TO THE ADDRESS BAR?

jayprakash sharma

Total Post:117

Points:821
Posted by  jayprakash sharma
C#  ASP.Net 
 1292  View(s)
Ratings:
Rate this:
How to modify URL to strip out the pathname and set it to the address bar
  1. Pravesh Singh

    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!