Events in 2 User Controls.
Posted on 2004-11-16
Here's my situation:
I have a page ( Index.aspx), here i have 2 place holders and i have two different user controls. call them: uc1 and uc2 ( user control)
Both these user controls have textboxes, and a submit button.
Here is what i want to do:
if uc1 button is clicked, i want to check if uc2 textboxes are filled first and call the submit button of the uc2 control -
and then do a uc1 button click. I am trying to check if the user has login information in the uc2 control and then do a some button click on the uc1 control.
the same way - if the user has some text information in the textboxes of uc1 and they click on the uc2 submit button - i want
to first finish uc2 button click and only then do a uc1 button submit.
By the way: there are some bussiness logic in each of these button submits.
I am trying to combine the two on a page level and process both if some information is entered in either of the controls.
I know this has to be done using some bubbling of events, but dont know how to proceed.
Should i create a separate class to handle this, or just do it on the page..
Gurus, Any help is appreciated.
Thanks in advance.