Home > ASP.NET, C# > .NET WebControl: TextBox with counter

.NET WebControl: TextBox with counter


Came across a need for a TextBox control with a countdown counter. Since I couldnt find one that would fit my requirements I decided to write one up.

It is in a very basic format at the moment and there is quite a lot that can be done with it. Feel free to improve, enhance, extend it.

Here is a screen shot of what it looks like:

TextBox with a countdown counter.

It is a very handy control to have.  You can use it in all three of the TextBox mode’s i.e. SingleLine, MultiLine, Password.

You can get the control and source code from here:

http://textboxwithcounter.codeplex.com/

Below is an example of how you can use this WebControl:

protected void Page_Load(object sender, EventArgs e)
{
    TextBoxWithCounter tbwCounter =  
    new TextBoxWithCounter(200, 5, 25, TextBoxMode.MultiLine);
    this.Form.Controls.Add(tbWcounter);
}
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: