Click here to Skip to main content
15,891,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I wanted to know that
how can i store value of Panel in View state
it gives me following error

Type 'System.Web.UI.WebControls.Panel' in Assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.



Thanks a lot in advance
Posted
Comments
[no name] 17-Mar-15 4:16am    
Can you show us the code ?
jigish shah 17-Mar-15 4:52am    
protected void ddl_department_SelectedIndexChanged(object sender, System.EventArgs e)
{
bind_data();
ViewState["_tab_panl_view_state"] = Panel1;
}
F-ES Sitecore 17-Mar-15 6:00am    
You can't store the panel itself in the ViewState, you will need to store whatever it is about the panel that is important to remember using data structures that are serialisable (strings, ints etc). You'll probably need to explain what it is you're trying to achieve a little better to come up with possible answers.
jigish shah 17-Mar-15 6:11am    
i have created dynamic ajax tab panel and in that i have generated dynamic gridview and i want that grid value on button click

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900