Dynamically adding a user control to aspx page

S

Sam

I am using an aspx page called USProfile.aspx. It has a placeholder control. A user control called USData is added to placeholder control dynamically. I am using LoadControl to add control USData to aspx page. I am doing this in Page_Init for every post back.

USData contains another user control called address. This address control has another control called state.

My problem is, after user fills the data, when I post this aspx page back, when I read the data entered by the user in USProfile.aspx.vb file, the state selected by user is not retained. All other user entered data in USData control is retained. That is address data is retained (Name, addressline1, 2 city etc which is in address control), but state selected (in state control) is not retained

Any clues?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top