Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 October 29th, 2005, 12:17 PM
Authorized User
Join Date: Oct 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to richie86
Default How to clear all text box in a form at once time

by using foreach statement, will this can be done on C#? but then in Visual Basic can be done, but i cant found the format that we should write in C#. Anyone can help me? thanks

Old October 31st, 2005, 04:57 AM
Authorized User
Join Date: Jul 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts

Rather than using C# (RoundTrip to the Server), you can do pretty fast in a clientside JavaScript. You can loop through the form controls and depending upon the type of the control,

(*) for type="text", set .value = ""
(*) for type="select-one" and "select-multiple", set selectedIndex = -1


Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/ and http://deepakvasudevan.blogspot.com/

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear Combo box jmss66 VB How-To 8 December 19th, 2007 09:12 AM
Cannot reference text box added at run time adman Beginning VB 6 5 September 19th, 2007 02:24 AM
record the time a text box is updated techsp Access 2 August 2nd, 2005 09:51 AM
Setting Focus on a Text Box in a Web Form vbmazza VB.NET 1 May 4th, 2005 09:19 AM

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