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 asp.net globalization?

493


there is two functions function a and function b like fun a(){.... ..... } fun b() { } in function b i write the coding to add two numbers and i need to dispaly the sum result in function a with out using global variable. how we do?

2221


Explain server control extensibility with reference to asp.net 2.0 ?

537


Explain the difference between response.redirect vs server.transfer

618


Explain how can we inherit a static member?

526






What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

536


What is the maximum number of classes that can be contained in one dll file?

674


What is the purpose of App_Code folder in ASP.NET? Why we this?

604


What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?

1418


What is full trust in asp.net?

540


how to transfer the file from client to server using asp.net

583


How can you debug your.net application?

550


Is asp.net a programming language?

531


What is an example of an application service provider?

449


What is a web api endpoint?

529