Viewstate doesn't clear

G

Guest

Upon submitting a form, I create a new record, read the blank record into the
form and return the user to the form. The values from the previous record are
still in the form. How can I clear the form without using the refresh button?


I don't want to diable viewstate on the control. I'd just like to do a
refresh from the codebehind or clear the viewstate.

Thanks
 
S

S. Justin Gengo

Mardy,

Clear each control manually...

TextBox1.Text = ""
DropDown.SelectedIndex = 0

Etc.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
J

JIMCO Software

Mardy said:
Upon submitting a form, I create a new record, read the blank record
into the form and return the user to the form. The values from the
previous record are still in the form. How can I clear the form
without using the refresh button?


I don't want to diable viewstate on the control. I'd just like to do a
refresh from the codebehind or clear the viewstate.

The values you are seeing are not persisted by Viewstate. They are
persisted via the LoadPostData method of the IPostBackDataHandler interface.
Any control that is rendered as an HTML field (such as TextBox,
DropDownList, etc.) is persisted between postbacks in this manner and not
via Viewstate.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top