Click here to Skip to main content
15,939,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

I am using vs2008 and in my application, I don't want to show up the *.aspx page extension. suppose the page link looks like this "http://www.abc.com/products.aspx" means then, it should be display "http://www.abc.com/products/" only.

I need to hide the extension of the every page..

How to do that?

Thanks,
Sampath
Posted

I suggest you two solution:
1. Use MVC pattern (recommend). Example: http://www.asp.net/mvc/tutorials/overview/understanding-models-views-and-controllers-cs[^]
2. Every aspx file must be Default.aspx, and put into separated directory. Example:
-products.aspx => products/Default.aspx. Then in url just http://www.abc.com/products. It will execute Default.aspx without show Default.aspx.
 
Share this answer
 
Comments
Tech Code Freak 23-Feb-12 4:12am    
5up!
Hi
Use URL Rewriting concept of asp.net

http://msdn.microsoft.com/en-us/library/ms972974.aspx[^]

URL Rewriting with ASP.NET[^]

Hope this will help :)

Thanks
 
Share this answer
 
Comments
Tech Code Freak 23-Feb-12 4:12am    
5up!
you can use

Url Routing [http://msdn.microsoft.com/en-us/magazine/dd347546.aspx[^]]

or you can re-write your url [Url Rewriting [^]]
 
Share this answer
 
Comments
Tech Code Freak 23-Feb-12 4:12am    
5up!

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