ASP. NET Web Forms-TextBox Control, formstextbox

Source: Internet
Author: User

ASP. NET Web Forms-TextBox Control, formstextbox

ASP. NET Web Forms-TextBox Control.

The TextBox Control is used to create a TextBox that allows users to enter text.

TextBox Control

The TextBox Control is used to create a TextBox that allows users to enter text.

The properties and properties of the TextBox Control are listed on the WebForms control reference manual page.

The following example demonstrates some properties of the TextBox Control that you may use:

Instance

A basic TextBox:

A password TextBox:

A TextBox with text:

A multiline TextBox:

A TextBox with height:

Runat = "server"/>

A TextBox with width:

Add script

When a form is submitted, the content and settings of the TextBox control may be modified by the server script. The form can be submitted by clicking a button or when the user modifies the value of the TextBox Control.

In the following example, A TextBox Control, a Button control, and a Label control are declared in the. aspx file. When the submit button is triggered, the submit subroutine is executed. The submit subroutine writes a line of text to the Label control:

Instance

Enter your name:

In the following example, we declare a TextBox Control and a Label control in the. aspx file. When you modify the value in TextBox and click (or press the Tab key) outside the TextBox, the change subroutine will be executed. The change subroutine writes a line of text to the Label control:

Instance

Enter your name:

Text = "Hello World! "

Ontextchanged = "change" autopostback = "true"/>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.