How to remove viewstate of usercontrol dynamically
I have around 10 user controls placed them in different tabs in AjaxTabContainer->Tab Panels. My viewstate is huge (around 24kb) for this page. 

I am programatically removing the viewstate of other user controls (assuming all controls within these usercontrols would force to use viewstate set by me) except the one in the active tab. I am setting this in ActiveTabChanged event in the codebehind. This is not working (i.e. viewstate is reduced).  

Like below:

protected void tcTabContainer1_ActiveTabChanged(object sender, EventArgs e)
    {
switch (tcTabContainer1.ActiveTabIndex)
        {
            case 0:
                uc1.EnableViewState = true;
                uc2.EnableViewState = false;
                uc3.EnableViewState = false;
                uc1.ShowData();
                break;
            case 1:
                uc1.EnableViewState = false;
                uc2.EnableViewState = true;
                uc3.EnableViewState = false;
                uc2.DisplayData();
                break;
            case 2:
                uc1.EnableViewState = false;
                uc2.EnableViewState = false;
                uc3.EnableViewState = true;
                uc3.DisplayData();
                break;
        }

    }
Even then the viewstate size is not reduced.

I can't (or I don't know how to) set these other usercontrols viewstate in pre-render, since I only know which tab is clicked in ActiveTabChanged event.

How to do this? Any ideas? 
How to remove viewstate of usercontrol dynamically
===

I have around 10 user controls placed them in different tabs in AjaxTabContainer->Tab Panels. My viewstate is huge (around 24kb) for this page. 

I am programatically removing the viewstate of other user controls (assuming all controls within these usercontrols would force to use viewstate set by me) except the one in the active tab. I am setting this in ActiveTabChanged event in the codebehind. This is not working (i.e. viewstate is reduced).  

Like below:

protected void tcTabContainer1_ActiveTabChanged(object sender, EventArgs e)
    {
switch (tcTabContainer1.ActiveTabIndex)
        {
            case 0:
                uc1.EnableViewState = true;
                uc2.EnableViewState = false;
                uc3.EnableViewState = false;
                uc1.ShowData();
                break;
            case 1:
                uc1.EnableViewState = false;
                uc2.EnableViewState = true;
                uc3.EnableViewState = false;
                uc2.DisplayData();
                break;
            case 2:
                uc1.EnableViewState = false;
                uc2.EnableViewState = false;
                uc3.EnableViewState = true;
                uc3.DisplayData();
                break;
        }

    }
Even then the viewstate size is not reduced.

I can't (or I don't know how to) set these other usercontrols viewstate in pre-render, since I only know which tab is clicked in ActiveTabChanged event.

How to do this? Any ideas? 