What is view state?

Answer Posted / jeyaseelan

view state is nothing but store all the current page
informations and the control details when the page is
postback.all the control details and values to be stored in
hidden field.Those hidden fields are creating dynamically
depending upon the page placed controls.If you want to
fetch the values of the previous page control(ex:'Name' is
the previous page control Id)

Get the value of name from second page

sample code:

string get_Name=viewstate["Name"].Tostring();

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain why do we use msmq?

548


How to manage pagination in a page using .net?

559


What is a formatter in .net?

568


What does mean by .net framework?

554


SAP Business One(this is intigrated tool of .net)

1770






How com+ related to the dna architecture?

581


Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

532


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

1843


Is .net core managed code?

513


What is a windows process in .net?

572


I want to serialize instances of my class. Should I use xmlserializer, soapformatter or binaryformatter?

528


What is Code group in .Net with respect to CAS

1568


How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?

529


Explain the different parts of an assembly?

577


Explain the main components in .net?

551