Passing values from ASPX to ASPX

kaisersoze

Centurion
Joined
Aug 27, 2003
Messages
152
Passing values from ASPX to ASPX, if the textboxes are placed in the aspx then passing to another aspx was easy (using properties, and using server.transfer). But, if I have a usercontrol and this user control has textboxes. in the codebehind i have properties to access these textbox.text. This user control is placed in one.aspx. How to pass values to two.aspx or another usercontrol in two.aspx.
 
I don't think this is the best way, but you can pass values via the url call.

When you call "webform1.aspx" file you can call "webform1.aspx?name=frank&age=42"

and you can retrieve these values in

Request.QueryString["name"]
Request.QueryString["age"]

and they always come as a string
 
Derek Stone

Derek Stone,
1. session works fine between pages and usercontrols
2. query string works fine between pages and usercontrols

3. with properties "NO" it is not working
If you have a usercontrol in page1.aspx and you have to pass values from usercontrol (uc1.ascx) of page1.aspx to another usercontrol (uc2.ascx) in a second page (page2.aspx) then it fails.
 
Back
Top