User Control Strange Request

  • Thread starter Thread starter margelos
  • Start date Start date
M

margelos

I have a user control that contains a button with a btnSubmit_Click
code. I put the control in a page and works great. I want to have the
ability in some pages to add some code to the page in order to be
executed just before the btnSubmit_Click and then the rest code of the
button will be executed normally. Can this be done? With a delegate
maybe? If so can you help me?

Thanks
 
Xm sounds good, but how i can make event as property??

Can you provide some code?

Thanks again

Ï/Ç Eliyahu Goldin Ýãñáøå:
 
The only thing that did was at the page

protected void Page_Load(object sender, EventArgs e) {
deposit.PreButton += new
ShopDeposit.BeforeSubmit(deposit_PreButton); // User control
}

void deposit_PreButton(object sender, EventArgs e) {
// Your Code
}

Ï/Ç Tim Heuer Ýãñáøå:
 
Back
Top