ASP.NET 1.x and 2.0 Application DesignApplication 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
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.
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.
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!