view state In user control

B

bhavik

I just want to know that can I sotred object In view state.
If yes then can I sotred that object In user cntrol (means can user control
support view state Like......)

Viewstate["Obj"]= Obj;


plz reply me as early as possible.
 
B

Brock Allen

Yes you can store objects in ViewState as long as they "allow" it by marking
themselves as Serializable. If they have any child objects as fields, then
those classes also need to be marked as such

[Serializable]
class MyData
{
// ...
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top