Click here to Skip to main content
15,891,607 members
Articles / Programming Languages / C# 4.0

How to clear a Multiple TextBox values in a single click in C# .NET

Rate me:
Please Sign up or sign in to vote.
4.22/5 (23 votes)
26 Sep 2011CPOL 103.7K   15  
Using this method, we can clear the text stored in a textbox easily.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
22 Sep 2011Mohammad A Rahman
A generic text clear method for those ASP.NET controls which implement the ITextControl interface:private void Clear(ControlCollection controlCollection) where T : ITextControl{ if (controlCollection == null) return; ...
Please Sign up or sign in to vote.
2 Oct 2011kris444
We can better have an extension like: public static class ControlExtension { public static IList FindControlByName(this Control control) where T : Control { List controlsFound = new List(); controlsFound.AddRange(control.Controls.OfType()); ...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Junior) CS1401
India India


Any fool can write code that a computer can understand. Good programmers write code that humans can understand.


Comments and Discussions