1

Wondering if someone here can help. I have an AJAX tabcontainer which has a number of tabs and each tab contains a user control. When I add a new item from one of the tabs, it is not reflected in the user control in another tab unless a postback occurs. (e.g. the first tab has a listview where I add a new record and the second has a simple form which contains a drop-down which I expect to contain value added from first tab). How can I make the tabcontainer to refresh its tabs from a usercontrol? Any help will be most appreciated.

Thanks, Ali

Ali
  • 73
  • 1
  • 2
  • 8

1 Answers1

0

You could fire an event from your first user control so that the page can handle this event and tell the other usercontrol to databind

Here is a example

<act:TabContainer ID="TabContainer2" runat="server" CssClass="EmployeeProfile" ActiveTabIndex="0">
<act:TabPanel ID="TabPanel1" runat="server" HeaderText="Datos Generales">
  <ContentTemplate>
    <br />
    <uc1:EmployeeGeneralDetails ID="EmployeeGeneralDetails2" runat="server" OnUpdated="EmployeeGeneralDetails2_OnUpdated" />
  </ContentTemplate>
</act:TabPanel>
<act:TabPanel ID="TabPanel2" runat="server" HeaderText="Referenias Personales">
  <ContentTemplate>
    <uc3:EmployeeResumeView ID="EmployeeResumeView2" runat="server" />
  </ContentTemplate>
</act:TabPanel>
</act:TabPanel>

 protected void EmployeeGeneralDetails2_OnUpdated(object o, EventArgs e)
{
  EmployeeResumeView2.DataBind();
}
alejandrobog
  • 2,091
  • 14
  • 20