Hi All,
how to pass server side (ASP.NEt 2.0 with C#.NET 2.0) array variable to another page's client script or How to access one server side web form's array variable in another web form's client script (javascript)?

Thanks in advance.

Raju

Recommended Answers

perhaps try using session state. set your array to a session state variable on the current page, retrieve it by calling session state on the receiving page. hang on I will find a good site to help you.

Jump to Post

All 4 Replies

perhaps try using session state. set your array to a session state variable on the current page, retrieve it by calling session state on the receiving page. hang on I will find a good site to help you.

If you use server.transfer, then use viewstate. If you do not, then use session state. Just remember to kill the session variable after receiving it to free up resources.

Session.Contents.Remove("array")

you can put it in the session.

Session.Add([session name as string], [your array])

retrive it on the session

Session.item([session name as string])

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.