or with the code that markfitzme posted but in both occasions I get the object is not marked as serializable. I googled the error and I found a lot of tutorials about serializing but most of them have to do with XML docs
I also tried the following code:
[Serializable]
Employee emp = null;
but i get the error that [serializable] can only be used in class,construct,enum etc...
how can i save my object to viewstate? sorry I tried but I just couldnt figure it out :S
Marciano
Member
37 Points
40 Posts
Re: Issue Mainteining Object after Button Click
Apr 19, 2012 10:50 PM|LINK
so, i tried to use the solutions given to me previously and im stuck with a new issue, I try to save the object in viewstate either using:
emp = actions.getSingleEmp(Request.QueryString["EID"]); ViewState["Employee"] = emp;or with the code that markfitzme posted but in both occasions I get the object is not marked as serializable. I googled the error and I found a lot of tutorials about serializing but most of them have to do with XML docs
I also tried the following code:
but i get the error that [serializable] can only be used in class,construct,enum etc...
how can i save my object to viewstate? sorry I tried but I just couldnt figure it out :S