Link to home
Start Free TrialLog in
Avatar of abhinayp86
abhinayp86Flag for United States of America

asked on

Gridview Viewstate

When ever i try assign a gridview in viewstate

ViewState("Something")=GridView1

i get this error

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

Any idea why is that?
It works good for session
Session("something")=gridview1, i get no error

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of abhinayp86

ASKER

Not wat i was lukin for but did the job