I simply need to pass 1 variable between 2 forms so that I may show information about that paticular item. This is set up in separate pages do to the nature of the many different type of items and then I also want to access it from a search. I know how to redirect
it but I need to also send the datakey/name that uniquely identifies that item to use in pulling up the details etc. I am fairly novice and I have researched the web and found info about session variables and server.transfer much of this seems to complex for
me to just send 1 field? now I am confused. What is the best way to do this? Please help. Thanks, Nicki
Do you know about querystrings? Dim sData as String sData=(whatever your data is) then, reponse.redirect("secondpage.aspx?data=" & sData) then, on the second page, Dim sData as String (globally) then, in Page_load event: sData=request.querystring("data") then,
you can use sData anywher on the page you'd like Here's a tutorial that goes into more depth:
Using Querystrings From Page to Page
Thanks a lot to both of you and I really appreciate the examples of using the query string with response.redirect and how to retrieve it because all the examples I had seen were about doing javascript.
nickicl
Star
8230 Points
1646 Posts
pass 1 variable to another webform
Aug 22, 2003 03:27 PM|LINK
augustwind
All-Star
35860 Points
4900 Posts
ASPInsiders
Moderator
Re: pass 1 variable to another webform
Aug 22, 2003 03:41 PM|LINK
All Things Dot Net
Stored Procs and Code in a Flash!
ASP.Net Sitemap Creator
rasheeda
Member
175 Points
35 Posts
Re: pass 1 variable to another webform
Aug 22, 2003 03:42 PM|LINK
Response.Redirect("Page2.aspx?datakey_name=" & yourdatakey)nickicl
Star
8230 Points
1646 Posts
Re: pass 1 variable to another webform
Aug 22, 2003 03:46 PM|LINK