asp.net - How to serialize complex objects and put them in a ViewState? -
i have object of type list<spsection>
, spsection
custom class contains string
, list<splistitem>
, splistitem
sharepoint object representing item.
i want store in viewstate
, don't know how this. there way serialize or convert binary string, put in viewstate
. when getting value viewstate
, how can convert list<spsection>
.
thanks
don't this. splistitem
instances cannot retained between requests. depend on respective splist
instance, in turn depends on spweb
+ spsite
, both instantiated automatically , provided through spcontext
.
what can retain item id
s between requests. custom classes need binary serializable, i.e. marked [serializable]
interface. store object under given key view state: viewstate["myobjects"] = myobjects;
.
Comments
Post a Comment