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
Explain ViewState?
I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place?
How to find out what version of asp.net I am using on my machine?
List the advantages and disadvantages of user control an custom control?
Can we set master page as a start page?
What is odata in web api?
What is Difference between Production Serves and Development Servers? And Suppose, m adding/deleting C# file in a project based on the Specific Requirement. These Files are Automatically updated in Production Servers? So Which tool is needed to do This One?
What is the difference between session and viewstate?
What is globalization and localization in asp net?
Do cookies store passwords?
What is asp.net and how it works?
What is authorization in asp.net?
What is runat?
What is difference between Fragment Caching and Page Caching in ASP.NET?
What are validators and list some validators of asp.net?