Click here to Skip to main content
15,900,474 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to remove the extension name of my page where i have hosted. give me an alternate solutions.
ex: Home.aspx as Home
Posted

You will need to create or modify your Global.asax to include the following code.
C#
void Application_BeginRequest(object sender, EventArgs e)
{
  string fullUrl = Request.Url.ToString();

  if (fullUrl.Contains("/products/suiting.aspx"))
  {
    Context.RewritePath("/products.aspx?category=suiting");
  }
  else if (fullUrl.Contains("/products/jackets.aspx"))
  {
    Context.RewritePath("/products.aspx?category=jackets");
  }
}
 
Share this answer
 
Hi Ammu,

You can do it by rewriting the url
Try this link [^]and this one [^].
Hope this helps you a bit.

Regards,
RK
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900