How do you store a value in viewstate and retrieve them?



How do you store a value in viewstate and retrieve them?..

Answer / Sunil Kumar Rastogi

To Store: ViewState["key"] = value; To Retrieve: value = ViewState["key"];

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

when will garbage collector run?

1 Answers  


I have a DataGrid in which two of the columns are editable...i want to update the backend table with the newly edited data of the datagrid. How to do this please help me.

1 Answers   MS Technosoft, Wipro,


What is the application pool?

1 Answers  


Are there any resources for drop-in replacements for the default css that comes with the ASP.NET Website template?

1 Answers   MCN Solutions,


What are the various ways of securing a web site that could prevent from hacking etc ?

1 Answers  


Differences between session state and Application state?

6 Answers  


How ASP and ASP.NET page works.

3 Answers  


Is there any alternative to avoid name collisions other then Namespaces?

1 Answers  


When a dropdownlist has been added by some records and it has been binded why it is not executing i'm facing this error pls help me ? if (is!pageposback) { arraylist books = new arraylist; books.add ("gone with the wind"); books.add ("rahulsriramprakash"); books.add ("vishal"); dropdowndisplay.datasource=books; dropdowndisplay.databind(); } The error is : 1) The dropdowndisplay does not exist.

5 Answers   Netsweeper,


what is the role of aspx file ?

2 Answers   Netsweeper,


What is authorization in asp.net?

1 Answers  


Difference between Response.redirect vs server.transfer?

1 Answers  


Categories