...

View Full Version : I need to pass variable values from one page to another



Lallo
03-19-2007, 08:42 PM
Hi everybody!

I need help to pass variable values from one page to another like this:
when I click a link (lets say on page default.aspx) to open the other page (lets say results.aspx) and when i click on the link in the address bar to be shown like: mysite.com/results.aspx?variableA=variableAvalue&variableB=variableBvalue

So if you have ideas, I'm waiting!

Thanks in advance!

Lallo

vinyl-junkie
03-19-2007, 11:28 PM
You might want to do it this way:


Response.Redirect("mysite.com/results.aspx?variableA=variableAvalue&variableB=variableBvalue")

You can also use Server.Transfer instead. To see the differences and decide which one would work best in your situation, you might to visit this page (http://www.developer.com/net/asp/article.php/3299641).

Lallo
03-19-2007, 11:41 PM
Great!!!
But that is only one half of my question...

What about to get those values in the second page and do whatever i want with them (to assign those values to variables in the second page for later use)?

vinyl-junkie
03-20-2007, 12:04 AM
For example:


Dim variableA as String = Request.QueryString("variableA")

Lallo
03-20-2007, 12:06 AM
thanks!!!!

I'll go for implementation now!

I hope it will work!!!
Thank you very much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum