Tuesday, September 22, 2015

ASP.NET TextBox Control

The TextBox control is used to get the input from the user of the web application. An asp.net textbox has several properties, that we need to be aware of as a developer. 



Properties of a TextBox control
1. TextMode Propertry - SingleLine, MultiLine and Password.
When you set the TextMode to MultiLine, use Rows property to control the number of lines to display for a MultiLine TextBox.

2. Text - Use this property to set or get the Text from the TextBox.

3. MaxLength - The maximum number of chatacters that a user can enter.

4. ReadOnly - Set this property to true if you don't want the user to change the text in the TextBox.

5. ToolTip - The tooltip is displayed when the mouse is over the control.

6. Columns - Use this property to specify the width of the TextBox in characters

7. Height - Set the height

8. Width - Set the width

9. AutoPostBack - By default, the TextChanged event of a TextBox control is cached in the viewstate, and is executed when the webform is submitted thru a postback by clicking the button control. If you want to change this behaviour, and post the webform immediately when the Text is changed, set AutoPostBack to true. Setting this property to true, will convert the cached event into a postback event.



Events of TextBox:
TextChanged - This event is fired, when the text is changed.

Methods of a TextBox:
Focus - Set input focus onto the control.

To view the properties of the TextBox, Right click on the control, and select Properties. In the properties window, you can also find the events supported by the control. 

All these properties can be set at the design time, or at runtime using code.


If you are searching life partner. your searching end with kpmarriage.com. now kpmarriage.com offer free matrimonial website which offer free message, free chat, free view contact information. so register here : kpmarriage.com- Free matrimonial website

Related Posts:

  • SQL JOINThe JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. … Read More
  • SQL DML and DDLSQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL). The query and update commands form th… Read More
  • SQL SELECT StatementSELECT statement is used to select data from a database. The result is stored in a result table, called the result-set. SQL SELECT Syntax SELECT col… Read More
  • SQL SELECT DISTINCT StatementIn a table, some of the columns may contain duplicate values. This is not a problem, however, sometimes you will want to list only the different (dist… Read More
  • Script Generator create table structureUsing TSQL to generate CREATE TABLE scripts in SQL Server has never been something that is easy to do. I have created the below system stored proc… Read More

0 comments:

Post a Comment