Hi all<BR><BR>I have a default.aspx page, in which I dynamic add a user<BR>control(.ascx) to the placeholder according to the one of the<BR>querystring&#039;s value, something like this:<BR>....<BR>ControlFile = GetControlFileFromAction(Request.QueryString["action"]);<BR>Control ctl = LoadControl(ControlFile);<BR>myPlaceholder.Control s.Add(ctl);<BR>....<BR><BR>everything work fine until I want to save / restore viewstate from my<BR>controls, here is a dummy code I use to test:<BR>[anycontrol.ascx]<BR>....<BR>private void Page_Load(...)<BR>{<BR> if(ViewState["count"] != null)<BR> {<BR> ViewState["count"] = (int)ViewState["count"] + 1;<BR> }<BR> if(!IsPostBack)<BR> {<BR> ViewState["count"] = 1;<BR> }<BR> else<BR> ViewState["count"] = (int)ViewState["count"] + 1;<BR>}<BR>....<BR><BR>I use debugger to walk throught this code, and found that<BR>ViewState["count"] is always equal to null.<BR>The above code work fine if the control is not dynamic added<BR>I am very confused, can you guy give my some advise/wordaround?<BR>any help in highly appreciated.<BR><BR>Thx All<BR><BR>