 |
| 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
|
|
|
|

December 5th, 2009, 02:11 AM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
|
|
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
|
|

December 5th, 2009, 10:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

December 5th, 2009, 12:39 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
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.
|
|

December 7th, 2009, 01:07 AM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
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.)
|
|

December 7th, 2009, 02:15 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
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.
|
|
 |