J
J-T
I have a aspx page which loaded different user contols based on the users'
entries.In one of my child user controls I have a property like below:
public String PostID
{
get
{
return (String) ViewState["PostID"];
}
set
{
ViewState["PostID"] = value;
}
}
Now from my aspx page (parent page) ,I'd like to se this propert so I can
maintain the PostID across multiple postbacks of my user control.How can I
do that?
Here is the way I load the child user control in my aspx page (parent page):
Control dynamicUC = null;
dynamicUC= LoadControl("~/PageControls/GetPostDetails.ascx");
dynamicUC.EnableViewState=true;
ViewState["PostID"]=postID;
Thanks a lot
entries.In one of my child user controls I have a property like below:
public String PostID
{
get
{
return (String) ViewState["PostID"];
}
set
{
ViewState["PostID"] = value;
}
}
Now from my aspx page (parent page) ,I'd like to se this propert so I can
maintain the PostID across multiple postbacks of my user control.How can I
do that?
Here is the way I load the child user control in my aspx page (parent page):
Control dynamicUC = null;
dynamicUC= LoadControl("~/PageControls/GetPostDetails.ascx");
dynamicUC.EnableViewState=true;
ViewState["PostID"]=postID;
Thanks a lot