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

What is the use of UML in .Net

619


What are situations when you register .NET assembly in GAC ?

648


What are the improvements made in cas in .net 4.0?

518


Explain what is a delegate?

592


Explain me what is the difference between a class and an object, and how do these terms relate to each other?

505






Explain what rare the types of jit and what is econo-jit?

521


What is a formatter in .net?

578


How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?

557


What's the .net collection class that allows an element to be accessed using a unique key?

568


What is the purpose of enumerable class in .net?

660


What is the intermediate language between asp and asp.net1.0?

1466


Define code access security (cas)?

572


What is Finalizer in .NET define Dispose and Finalize ?

577


Is it true that objects don't always get destroyed immediately when the last reference goes away?

568


What is singleton activation mode in .net?

688