web user control and events

A

Ariel Gimenez

Hello, i need a solution for this problem:

i developed a page in which I put a Web user control that is the header of
the aspx

1 in the page I have textbox that I do not want to show as much until this
insurance that has completed all the data of the Web user control.

2 in the Web user control I have a button that is to save header data

3 in the page load (the page that contains the control) I ask if in session
is the data from this Web user control and I show or hidde the textbox

the problem is that this does not work because first the page executes the
load and late the web user control code

some idea of another alternative to handle this?

thank you very much
 
S

Steve C. Orr [MVP, MCSD]

Move your code from the Page_Load event to the Page_PreRender event, because
it happens after the Button's Click event instead of before.
 
A

Ariel Gimenez

Thanks Steve!!!

Steve C. Orr said:
Move your code from the Page_Load event to the Page_PreRender event, because
it happens after the Button's Click event instead of before.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top