Ask a Question related to ASP.NET General, Design and Development.
-
Steve C. Orr, MCSD #1
Re: And Another: Passing variables from one page to the next.
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.
[url]http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx[/url]
[url]http://www.aspalliance.com/kenc/passval.aspx[/url]
[url]http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=600[/url]
[url]http://www.dotnetbips.com/displayarticle.aspx?id=79[/url]
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Child" <beth@NOT-SO-bad-dawgs-in-ak.com> wrote in message
news:Xns93D1783809A73bethNOTSObaddawgsina@216.168. 3.44...from one page to the> I cannot for the life of me figure out how to get my identifying variablevariable, but I> next. I am certain this is a stupid question.
>
> I tried setting a sesion variable and redirecting to the next page.
>
> session("orgid")=ddlorgs.selecteditem.value
> response.redirect("edit_org.aspx")
>
> the session varible doesnt' exist. Perhaps I am misunderstanding the> thought they were persistent across an entire session.
>
> Thank you all for your kindly and patient help.
>
>
> --
> BethF, Anchorage, AK
>
> It's YOUR God.
> They are YOUR rules.
> YOU burn in hell.
Steve C. Orr, MCSD Guest
-
Passing Variables
Hi there, I just managed to install apache2 webserver with php 4.3.8. I'm developing some php files. Previously I used an external webserver but... -
Passing variables from one swf to another
I am facing problem to pass variable from one swf to another. I am using loadMovie to load another swf. how can I pass a variable value to another... -
Passing ASP Variables
I have a form that submits to a SQL database. The table in SQL uses an identity field for the primary key called "entry". This is so I can get the... -
passing variables to new HTML page
Im using a javascript search system combined with flash This actionscript is used in the button on (release, keyPress "<Enter>")... -
passing variables from first page to third
I am new to the world of ASP, and at the same time VBscript (also a firt time poster). I am currently creating a multiple page form where the... -
Prakash R. #2
And Another: Passing variables from one page to the next.
Please post the code reading from session.
With Regards
Prakash R.identifying variable from one page to the>-----Original Message-----
>I cannot for the life of me figure out how to get mynext page.>next. I am certain this is a stupid question.
>
>I tried setting a sesion variable and redirecting to themisunderstanding the variable, but I>
>session("orgid")=ddlorgs.selecteditem.value
>response.redirect("edit_org.aspx")
>
>the session varible doesnt' exist. Perhaps I am>thought they were persistent across an entire session.
>
>Thank you all for your kindly and patient help.
>
>
>--
>BethF, Anchorage, AK
>
>It's YOUR God.
>They are YOUR rules.
>YOU burn in hell.
>.
>Prakash R. Guest
-
Child #3
Re: And Another: Passing variables from one page to the next.
"Prakash R." <p_ramdas@hotmail.com> wrote in news:02e301c35df1$6bf8e100
$a401280a@phx.gbl:
> Please post the code reading from session.
>
SQLString="select * from tblOrgs where orgid = " & session("orgid")
Thanks!
--
BethF, Anchorage, AK
It's YOUR God.
They are YOUR rules.
YOU burn in hell.
Child Guest



Reply With Quote

