Need help with viewstate coding

T

Tony Girgenti

Hello.

I'm trying to develop a web comsuming client using VS.NET 2003(VB), .NET
Framework 1.1.4322, ASP.NET 1.1.4322, WSE2.0 on a WinXP Pro Sp2 comuter.

I want to use a web form for this because i like the fact that there is no
installation involved, just copying the file to the users location.

In doing some testing, i discovered that a web form does not retain
variables entered by the user. I also discovered that it's because of
something called state management.

If i want to use the ViewState property to retain variables, i read an
article that said i need to put this into my program:
<form runat="server">.

Where do I put that statement ?

In order to save a textbox entry by the user, do i do this ?
ViewState("UserInp") = textbox1.text

and then to restore it when control comes back:
textbox1.text = ViewState("UserInp")

Is this all i need to do ? If so, where do i put this code ?

Any help would be gratefully appreciated.

Thanks,
Tony
 
G

Guest

Tony,
The best place to start if you are at this level and would like to progress
with the minimum amount of frustration, is to start going through the ASP.NET
QUCKSTARTS. This installs with .NET Framework or VisualStudio, and there are
also online versions. Find one at www.asp.net
Peter
 
T

Tony Girgenti

Hello Peter.

I tried every resource that i had access to and still could not find what i
am looking for. All of the coding examples show you the syntax and snippets
of code, but none of them explain where to put the coding.

Considering the fact that i am an idiot with this stuff, i need a complete
example showing where to put the statements not just an example of how to
code it.

Thanks,
Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top