Hi
We have an aspx page with a usercontrol lying directly in the page and a tabstip with usercontrols dynamically loaded on each tab on demand.
Based on the save operation of user control inside a particular tab, we would like to refresh data in the user controls that direcly place in the aspx page.
But the problem is the evenhandler is always null inside the usercontrol in the tabstrip.
Are we using the right code to handle this?
Here is the code from ascx control residing inside a tab:
Related code in aspx page:
Any of your response will be of great help to me.
We have an aspx page with a usercontrol lying directly in the page and a tabstip with usercontrols dynamically loaded on each tab on demand.
Based on the save operation of user control inside a particular tab, we would like to refresh data in the user controls that direcly place in the aspx page.
But the problem is the evenhandler is always null inside the usercontrol in the tabstrip.
Are we using the right code to handle this?
Here is the code from ascx control residing inside a tab:
private System.EventHandler ButtonResSaveClicked;
public event EventHandler BtnResSaveClicked
{
add
{ ButtonResSaveClicked += value; }
remove
{ ButtonResSaveClicked -= value; }
}
protected void btnSave_Click(object sender, EventArgs e)
{
//Perform save operation
if (ButtonResSaveClicked != null)
{
ButtonResSaveClicked(sender, e);
}
}
Related code in aspx page:
ucFromTab.ButtonResSaveClicked+= ucInPage.RefreshData;
Any of your response will be of great help to me.