Error: TabContainer1_ActiveTabChanged is undefined RRS feed

  • Question

  • User-1176147176 posted

    I added OnClientActiveTabChanged="TabContainer1_ActiveTabChanged" to a TabContainer control on an ASPX page.

    The code is in the code behind:

    public void TabContainer1_ActiveTabChanged(object sender, EventArgs e)
                this.ViewState["ActiveTabIndex"] = TabContainer1.ActiveTabIndex;

    When I run the page, the screen displays with the whole tab container thing missing, and an error on the page.

    The error says TabContainer1_ActiveTabChanged is undefined.

    What am I doing wrong?

    Monday, December 2, 2013 12:43 PM


  • User1734617369 posted


    You have added the event to the client side event OnClientActiveTabChanged but your code is in the code behind, change the OnClientActiveTabChanged="TabContainer1_ActiveTabChanged" to OnActiveTabChanged="TabContainer1_ActiveTabChanged" instead.

    Best regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 2, 2013 5:09 PM