Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 3rd, 2003, 11:06 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default Clearing a Form

Does anyone know how to clear a Form with say, a button click, without using an HTML button. I know I can do this with javascript, but is there some sort of clear method somewhere in .NET. I haven't found it.

Thanks!

Jim

 
Old December 3rd, 2003, 11:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

do you want to clear the form on the client-side or server-side?

I'd assume, if you wanted to do this on the server side, you would need to create your own "clear" that clears all the values of all the controls. I don't know of any server-side .net equivalent to the client-side "Clear" input button.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 3rd, 2003, 11:43 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Thanks, yes I want to clear all controls, but was hoping I didn't have to do it one by one if I did it server side, I guess it's just easier with JS or the HTML clear button. Thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
clearing out the form x_ray VB.NET 2002/2003 Basics 9 February 21st, 2006 04:44 PM
clearing the form europhreak Dreamweaver (all versions) 1 September 18th, 2005 03:35 AM
Clearing a label in FORM LOAD sweet4511 VB How-To 2 July 19th, 2005 01:22 PM
register.php: clearing html form fields lamada BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 26th, 2004 01:25 PM
Clearing values from form and ASP variables sniffer Classic ASP Basics 1 September 24th, 2003 02:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.