Here's a nice, simple way to pass values from one page to another:
(VB.NET code)
'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")
Then, in WebForm2.aspx:
'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)
Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx http://www.aspalliance.com/kenc/passval.aspx http://www.dotnetbips.com/displayarticle.aspx?id=79
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"nicholas" <mu********@hotmail.com> wrote in message
news:u4**************@TK2MSFTNGP10.phx.gbl...
When I transfer variables from 1 page to another I add the variables in
the
querystring.
So, in the script of my asp-button I put for ex.:
response.redirect("thenewpage.aspx?myvar=<%= thevariable %>")
problem is that these variables are ofcourse visible in the url
So, what is the best and easiest way to transfer variables from one
aspx-page to another?
(Through a button, as in the example, or with a link.)
THX for help.