how to store web usercontrol in viewstate

hd-coderz

New Member
I am trying to register a user control in web page and on page unload user control's viewstate save in web page's hidden field.\[code\]((HiddenField)(this.Page.FindControl("Hidden_LocationUC"))).Value = http://stackoverflow.com/questions/14050584/this.ViewState.ToString();\[/code\]When again page load then user control load from hidden field but I am unable to store view state in hidden field.\[code\]this.ViewState = ((HiddenField)(this.Page.FindControl("Hidden_LocationUC"))).Value;\[/code\]This code is results in error.
 
Back
Top