Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Note: I think as a programmer not as a human, so use my answer at your will
Posted

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

Experience is something you don't get until just after the moment you needed it
Posted

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.

Note: I think as a programmer not as a human, so use my answer at your will

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...