Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how do i remove extensions from page url in c#. like .aspx

e.g http://www.codeproject.com/Questions/ask.aspx

i want the url of my web application in following format..
http://www.codeproject.com/Questions/ask

if any one have a idea then pleas guide me...
Posted
Comments
King Fisher 6-Jan-15 0:24am    
Refer this :
http://www.codeproject.com/Articles/2538/URL-Rewriting-with-ASP-NET

Have you searched this in Google before posting here?
There are several good articles available for this in the internet.

My recommendation is the following blog post by Scott Hanselman
Redirecting ASP.NET Legacy URLs to Extensionless with the IIS Rewrite Module[^]

Hope, it helps :)
 
Share this answer
 
Hello Sudhir ,
ARe You aware of the concept HTTPHandler or UrlRewritting.If Not Kindly Refer the simple example.
Simple Example
Anotheir Example
This Example explains you the concept

I have also Faced this situation some times earlier.

Hope It Helps you
Happy Coding
 
Share this answer
 
v2
Comments
SUDHIR PATIL(Member 10803868) 6-Jan-15 1:27am    
Hi Neetin sir,
thanks, i have refer your solutions. but sometime means on some forms i have problem regarding with javaScript, after referesh the page i have again the extensions in url.
because, JS not working with update
panel.
Neetin_1809 6-Jan-15 1:46am    
Are You Trying IN IE Or Chrome ?If you are using in Chrome See the console for errors.

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