Problem using Web User Control

G

Guest

Hi,

I have a web user control 'control1.ascx' which is used on page
'default.aspx'. The control renders fine. But I would like to get new values
in the control based on the submit button. So if the control had a value and
I click the submit button. I want the control to load based on the value I
assigned in the submitButton_click code.

But the problem is the page_load event of the control1.ascx is executed
before the submitButton_click code is executed.

How can I get this to work?

Thanks in advance.
 
B

bruce barker \(sqlwork.com\)

to process postback data and events, you need to rebuild the form as it was
at render, before onload. in you case just change the values in the onclick
event.

-- bruce (sqlwork.com)
 
J

Jon Paal

dynamic control loading should occur during the Init stage of the page life cycle.
 

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

Top