User288213138 posted
Hi thepast,
thepast
I want to hide page name or change any thing
http://www.hh.com/hp/index.aspx
I want it http://www.hh.com or http://www.hh.com/hp or http://www.hh.com/hp/lasdjfsdpfsdfsdfsldf;sdfas;d~djas;
how can I do this
If you want to change the url in web form, you can try to use URL Routing.
You can add routes in a method that is called from the handler for the Application_Start event in the Global.asax file, this approach makes sure that the routes are available when the application starts.
More information about the use of URL Routing you can refer to this link: https://chsakell.com/2013/12/15/url-rooting-in-asp-net-web-forms/
The code:
public void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("", "Category/{action}/{categoryName}", "~/categoriespage.aspx");
}
Best regards,
Sam