what is view state?

Answer Posted / madhunathanv

Sorry,
in the above example of declaration and calling View state
Key Name Should the same but it was not so while declaring
the key name was "ViewStateVariableName" and while calling
the key name was "ViewStateVariable" which won't work if
so, it was by mistake,
ie..,when called name was changed..,
Cool:-)
Below is the Correct Format:

**********************'
ViewState Declared As:'
**********************'
ViewState["ViewStateVariableName"] = 1;
**********************************'
Above ViewState Can be called As: '
**********************************'
int number = (int) ViewState["ViewStateVariableName"];

AFAIK

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is application session?

511


What is asp according to you?

540


How can we use Web API with ASP.NET Web Form?

658


Explain the use of errorprovider control in .net?

517


How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.

5091






What is a runtime version?

544


Hi All, Im an MCA holder with 3+ years of experience in asp.net. Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj

2853


Explain the asp.net page life cycle.

566


Why do we use asp.net?

593


What is the difference between CLICK and MOUSE DOWN Event ?

593


What is asp.net caching?

585


What is view state and how it works in asp net?

566


How do I debug an asp.net application that was not written with visual studio.net and that does not use code-behind?

563


Why is it preferred to not use finalize for clean up?

565


What is rich control in asp.net?

533