Hi,

I'm writing an ASP.net c# page that has an Ajax TabContainer.

I have a static asp:Table in the html source that shows a date
selector...

I want it to show up inside each tab (looks better than being outside
in this case) -- but i don't want to write it many times (plus i want
it to really be the same value... if u select a certain date and
switch tabs, it should stay on the date u selected).

So I add it to the selected tab's Controls collection like this:

TabContainer1.Tabs[TabContainer1.ActiveTabIndex].Controls.Add
(tblMonthSelector);

shows up fine after the first load...but if i change the dropdown to a
different date, it auto posts back, and the dropdown loses all its
selected value (it works fine if i don't add it to the Tab).

I know it's something to do with the ViewState, but i can't figure out
from my reading on how exactly i need to code it... if i put it in the
Page.Init, it maintains the value...however, it always puts it in the
first tab (i'm guessing since on the Init() it didn't load the
viewstate of the TabContainer yet??)

Thanks for any advice!

Reply via email to