Category: textbox

Allow only numbers in textbox asp.net

{0 Comments}

You can restrict a text box to get numeric/numbers only, for this the best way is to apply regular expression check point. For regex validation you can choose one of two (code behind and designer mode) validating method according to your use. The most important thing is the correct regular expression which truly validates your …

Read More…

Validate text box input form code behind in C#

{0 Comments}

Most of time it has been noticed that asp.net programmer uses validating tool from toolbox to validate text box control, but when there is need of multiple conditional validating of a single text box control then, it become more problematic to handle this situation from the design view or using validating tool from toolbar and …

Read More…

How to create text box in asp.net (Newbie)

{0 Comments}

This article will tell you how simply you can create a textbox in asp.net there are two ways you can do this. 1)  Firstly, all you have to drag and drop text box to xhtml page having extension as aspx or simply double click on the textbox icon in the toolbox under standard submenu.  This …

Read More…

How to add text box dynamically in asp.net

{0 Comments}

How to add text box dynamically in asp.net

Generally we add text box by dragging or by adding xhtml code with server tag in asp.net website or application. But when it comes to add controls dynamically, conditions slightly changes. Let’s have a look on syntax for adding textbox dynamically. Code which you will write in an event is as follows:  C# |  copy code |? 1Controls.Add(new TextBox() { …

Read More…

How to validate textbox in asp.net

{0 Comments}

In this article you will know how to apply validations on textbox in asp.net.   please go through following steps. Steps to apply validation to textbox 1)      Take a text box on your web form from your toolbox under standard menu.  HTML |  copy code |? 1<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox> 2)      Now choose one among those five different validators present in toolbox …

Read More…

How to clear text box in asp.net

{0 Comments}

I know it is very simple to clear a text box, in asp.net. But I want to tell you there are various such ways to clear a text box; this different way can help you in various programming conditions. Let’s start with the first one. Among this list first is the mostly used for clearing …

Read More…