Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 11-May-12 3:15am
Comments
jkirkerx at 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 at 19-Jun-13 8:19am
   
not changing the url while click on any link asp.net
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You need URL Rewriting.
 
Read here: URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]
 
OR
 
Read about, In ASP.NET 4.0: URL Routing[^]
  Permalink  
Comments
sravani.v at 12-May-12 1:20am
   
My 5!
Sandeep Mewara at 12-May-12 5:36am
   
Thanks Sravani.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

use server.transfer instead response.redirect
  Permalink  
Comments
CHill60 at 19-Jun-13 8:50am
   
Same as point 1 in solution 1

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 395
1 Maciej Los 268
2 OriginalGriff 230
3 CHill60 221
4 Sibeesh KV 139


Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 19 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100