Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2007, 01:27 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to cholletivinod
Default Hide pagename in url

Hi friends ,

am creating one application in that i want to navigate across multiple pages (around 10 pages)by showing firstpage url(hiding all other pages in url)

if any onee knows pls give rep


Vinod
 
Old August 6th, 2007, 09:55 AM
Friend of Wrox
 
Join Date: Feb 2006
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav_jain2403
Default

Use Server.Transfer instead of Response.Redirect. But there are some drawbacks with using Server.Transfer . Search and read those drawbacks before using it.
 
Old August 6th, 2007, 10:23 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Or you can create a single frame frameset in the first page and all navigation afterwards happens within the frame which doesn't affect the address bar.

-Peter
 
Old August 7th, 2007, 12:26 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I agree with Peter, use frameset




Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"
 
Old August 8th, 2007, 12:51 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

are you people talking about frame tag of HTML?

thanks......
 
Old August 8th, 2007, 08:07 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Yes. You could either create one page with an IFRAME in it or an html FRAMESET with a single FRAME. They'll each function the same.

-Peter
 
Old August 10th, 2007, 02:21 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

okay well what are its advantages compare to server.tranfer.


thanks......
 
Old August 10th, 2007, 08:43 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Server.Transfer really doesn't make any sense for this because it doesn't do anything from the client perspective. It transfers execution of a page to another page and is invisible to the user.

Let's say that your main page is Default.aspx. Every time the client requests a page they will be hitting Default.aspx. If they want to go to another page (let's say you have a News.aspx page) they click on some link/button. This link/button MUST do a postback in order to execute some server-side to perform a Server.Transfer. So they click the button, you do Server.Transfer and execute the News.aspx page. Now the user is still seeing Default.aspx in the browser. So if there is a button that does something on the news page, the browser is still posting to Default.aspx. You need logic in Default.aspx that knows the user is now on *really* looking at the News.aspx page so you can Server.Transfer (again, and every single time) to the appropriate page.

As you can see the problem is that you are going to have to keep track of what page you really need to run and have all kinds of logic in the "main page" that handles the transferring to all the other pages.

Another problem is that every single link to other pages which could normally be satisfied with a standard hyperlink now has to be server postback. This creates lots of unnecessary round trips just to go to another page.

I think you would find building this a major pain and the difficulty far outweighs the desire to obfuscate the URL, particularly when there are far easier solutions.

I have been build web apps for a long time and I have never found a reason to use Server.Transfer in either classic ASP or ASP.NET.

-Peter
 
Old August 11th, 2007, 12:50 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to cholletivinod
Default

Hi if i use server.transfer we can navigate but it is possible only for two pages in my application there are 10 pages how can i pls tell me frnd

Quote:
quote:Originally posted by planoie
 Server.Transfer really doesn't make any sense for this because it doesn't do anything from the client perspective. It transfers execution of a page to another page and is invisible to the user.

Let's say that your main page is Default.aspx. Every time the client requests a page they will be hitting Default.aspx. If they want to go to another page (let's say you have a News.aspx page) they click on some link/button. This link/button MUST do a postback in order to execute some server-side to perform a Server.Transfer. So they click the button, you do Server.Transfer and execute the News.aspx page. Now the user is still seeing Default.aspx in the browser. So if there is a button that does something on the news page, the browser is still posting to Default.aspx. You need logic in Default.aspx that knows the user is now on *really* looking at the News.aspx page so you can Server.Transfer (again, and every single time) to the appropriate page.

As you can see the problem is that you are going to have to keep track of what page you really need to run and have all kinds of logic in the "main page" that handles the transferring to all the other pages.

Another problem is that every single link to other pages which could normally be satisfied with a standard hyperlink now has to be server postback. This creates lots of unnecessary round trips just to go to another page.

I think you would find building this a major pain and the difficulty far outweighs the desire to obfuscate the URL, particularly when there are far easier solutions.

I have been build web apps for a long time and I have never found a reason to use Server.Transfer in either classic ASP or ASP.NET.

-Peter
Vinod
 
Old August 11th, 2007, 12:53 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to cholletivinod
Default

There are seperate pages in my application is der any possibility without using frameset , without using frame set how can we implement this its urgent friend give Rep and also tell me how can i implement FRAMESET

Vinnu


Quote:
quote:Originally posted by planoie
 Or you can create a single frame frameset in the first page and all navigation afterwards happens within the frame which doesn't affect the address bar.

-Peter
Vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirect based on given URL somnath.kartic VS.NET 2002/2003 1 August 2nd, 2012 08:21 AM
URL rewriting with URL forwarding mtabyana BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 0 October 22nd, 2007 08:22 AM
How to hide Extension of Page in URL ? savan_thakkar ASP.NET 1.0 and 1.1 Professional 9 February 24th, 2006 10:31 AM
Could not load type 'Namespace.PageName'. Bhavin Crystal Reports 0 December 16th, 2004 03:58 PM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.