What is viewstate?

Answer Posted / sivadatta kodali

This concept comes in the state management.For Asp.net
server controls implicitly the state of control will be
maintained with the support of viewstate.View state will
maintain some information at the Html Hiddenfield and the
will be Encrypted.

If u want to set the value explicitly.

viewstate["Key"]=value;

If u want to Read the value from the viewstate

viewstate["key"].Tostring();

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between application events and session events

596


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

1494


In which event of page cycle is the viewstate available?

580


Explain method to handle error using HttpError in Web API?

585


What is in a session cookie?

542






List of words of preprocessor in .net?

520


What does the hotspot class in .net do?

571


What can we do with asp.net?

516


What's the ASP.Net Application life cycle?

566


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

627


What are the data controls available in asp.net?

509


What do you mean by View State and what is its role?

538


How can you send an email message from an asp.net web page?

525


Which protocol is used to call a web service?

569


What setting must be added in the configuration file to deny a particular user from accessing the secured resources?

497