I have a windows form application , In which i created two tab pages. In one of the tab page i have a button to send email notification. In the tabpage leave event i have some code to perform some other actions. When i click on this button to send email. First it fires tabpage leave event , as ithe button contains button1.enabled=false; in the first line as below,
private void btnTestEmail_Click(object sender, EventArgs e)
{
btnTestEmail.Enabled = false;
bool sent = Support.SendEmail("Test Email", "This is a test email, Please ignore.", null);
--
}
But when i remove btnTestEmail.Enabled = false; code it is not firing tabpage leave event. What could be the reason that it fires the leave event of tab page. As it is vbery strange behaviour. As i dont want to fire any event of tab page .
Regards