By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,878 Members | 1,370 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,878 IT Pros & Developers. It's quick & easy.

Clearing form

P: n/a
Not as far as I know. The easiest way is just to create a
loop to set all of the controls values to "". You'll
probably have to use a typeof statement to come up with
specific clearing methods for different controls, but I
don't think there is an automatic way to reset the page. I
could be wrong though...

Jeff Levinson
-----Original Message-----

I'm using VS.Net 2003. I have created a web form that I want to use fordata entry. It works pretty damned well, if I do say so myself. (Gottalove the FCL validation routines!)

My problem is that after the user fills in the form, presses the submitbutton, and I save the data to the database I'd like the form to becleared for new data entry. I've tried setting viewstate to false onthe document object, and I've tried calling ClearChildViewState in thePage_Load event handler, to no avail.

Is there anyway short of going around to each control and setting thetext to "" to clear the page?

-- Rick

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.