|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ViewState
I am pretty new to ASP.NET. I have been trying for quite some time to get ViewState to work in my applications. If I just want to get a textbox to keep the value when I go to another page and return or if I just refresh the page. How do I go about doing that? Do I need to do any coding or is it enough if I click on enable viewstate in Visual Studio .NET for the textbox (and maybe for the document)? Anyway, I've of course tried this, but it is not working. <img border="0" src="/forum/emoticons/confused.gif" height="22" width="15" alt="confused" />
|
|
#2
|
|||
|
|||
|
The viewstate is only used on the same page. With ASP.NET you don't typically post to another page, but back to the one you are on.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
|
#3
|
|||
|
|||
|
OK. That was a good thing to know. But how do you refresh the same page and keep the same values? And when I say go to another page, I mean I am still in the same ASP.NET application.
|
|
#4
|
|||
|
|||
|
What are you doing that requires you going to another page? You can always pass the values in a querystring and capture them in the page_load event on the next page.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > ViewState |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|