how i can pass an array into a view state
-
how i can pass an array into a viewstate and at the same time how i can retrive that array from a view state
Why do you want to use the Viewstate? I suggest you to use the Session or Cache.. For example:
Session["mysession"] = yourarrayvariable;
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
how i can pass an array into a viewstate and at the same time how i can retrive that array from a view state
jagadeeshkumar2106 wrote:
how i can pass an array into a viewstate and at the same time how i can retrive that array from a view state
To add an Array to a Viewstate
Viewstate.Add("KeyName", ArrayVal)
To retrieve the array from the viewstatestringArrayVar = CType(ViewState("KeyName"), String())
Note : ViewState can persist the values during the postback and are accessible on the same page, can not be accessed accross the pages.- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.