Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > Visual Web Developer 2005
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 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 December 5th, 2009, 02:11 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Question Passing Value to another page & then again to another page

Hi,

I want to pass a value from one page to another(say from page1 to page2) & the same value again to another page(say page3).


What is the best way to do this in vb.net. Query string, Session Variables or any other method?

Thanx

“Peace comes from within. Do not seek it without.”
Anup
 
Old December 5th, 2009, 10:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Anup ,

It all depends on your needs, what the object is and so on.

If it's a scalar value (int, string, etc) then the Query String makes perfect sense. If it's a large or complex object, or it needs to be secured, Session state or a database make more sense.

In other words, it's impossible to say what's the best solutuion if you don't tell us what it is you need to pass around.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
chroniclemaster1 (December 5th, 2009)
 
Old December 5th, 2009, 12:39 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Thanks for the breakdown, Imar. I love that the answer comes with an explanation.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old December 7th, 2009, 01:07 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Hi Anup ,

It all depends on your needs, what the object is and so on.

If it's a scalar value (int, string, etc) then the Query String makes perfect sense. If it's a large or complex object, or it needs to be secured, Session state or a database make more sense.

In other words, it's impossible to say what's the best solutuion if you don't tell us what it is you need to pass around.

Cheers,

Imar
Actually I am sending Image name as a value to the next page & same value to another page.

(On my first page, I am displaying List of Images & when the user clicks on one image, the same image opens on the second page - This is what i am doing.)
 
Old December 7th, 2009, 02:15 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

In that case, I'd definitely pass the image name as a string parameter in the url. Just make sure your image names are unique (you could pass the image id, but that results in nasty urls (bad security, bad usability, bad SEO))
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing objects between One Page to next page muralidharan.d ASP.NET 1.0 and 1.1 Basics 2 July 3rd, 2007 07:48 PM
passing values from ASP page to a popup ASP Page astrosmurfboy Classic ASP Basics 3 April 21st, 2004 08:17 PM





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