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 me why do we use msmq?

652


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

1867


What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?

606


Explain difference between panel and groupbox classes using .net?

615


What is the difference between a namespace and assembly name in .net?

609






What are the authentication methods in .net?

648


What is garbage collection in .net? Explain the garbage collection process?

655


Difference between class and interface in .net?

669


How will you load an assembly which is not referenced by current assembly?

635


What are the difference bbetween value type & reference types ? Example from .net. Integer & struct are value types or reference types in .net?

616


What is data type and how many types of data types are in .NET ?

641


i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net

2240


Tell us what is the native image generator?

643


With these events, why wouldn't microsoft combine invalidate and paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?

600


Usually in .net, the clr takes care of memory management. Is there any need for a programmer to explicitly release memory and resources? If yes, why and how?

685