Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

we have multiple aspx page such as default.aspx, default2.aspx and default3.aspx,
i don't want to display the page name such as (www.XYZ.com/default2.aspx),
(www.XYZ.com/default2.aspx) and (www.XYZ.com/default2.aspx) in the browser address bar (as URL), while i'm navigating the page.

i want to display (www.XYZ.com/default.aspx) as url always either i'm on default.aspx, default2.aspx or default3.aspx.

please give me answer.
Posted
Comments
jkirkerx 11-May-12 14:47pm    
So why have 3 pages then?, why not just build everything on a single page

people don't like changing pages, they prefer to stay on a single page.
Member 10066748 19-Jun-13 8:19am    
not changing the url while click on any link asp.net

use server.transfer instead response.redirect
 
Share this answer
 
Comments
CHill60 19-Jun-13 8:50am    
Same as point 1 in solution 1
You need URL Rewriting.

Read here: URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]

OR

Read about, In ASP.NET 4.0: URL Routing[^]
 
Share this answer
 
Comments
sravani.v 12-May-12 1:20am    
My 5!
Sandeep Mewara 12-May-12 5:36am    
Thanks Sravani.
1:- When you redirect to another page. you should use server.transfer("pagename.aspx");
By this address bar don't show redirect page name.


2:- For hide all page name by address bar. This setting is in IIS.

3:- http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx[^]
 
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