ASP. NET TextBox control
The TextBox control is used to create a text box. You can enter text.
TextBox control
The TextBox control is used to create a text box. You can enter text.
The network control reference page lists the properties and properties of the TextBox control.
The following example shows some TextBox controls that you can use for attributes:
For example
A TextBox with text:
<Asp: TextBox id = "tb4" Text = "Hello World! "Runat =" server "/>
<Br/>
A multiline TextBox:
<Asp: TextBox id = "Int32" TextMode = "multiline" runat = "server"/>
<Br/>
A TextBox with height:
<Asp: TextBox id = "tb6" rows = "5" TextMode = "multiline"
Runat = "server"/>
<Br/>
Add script
A TextBox control for content and settings can be submitted in the form of a server script. Form submission can be done by clicking a button or when the user changes the value of the TextBox control.
In the following example, we declare a TextBox control, a Button control, and a Label control. Aspx file. When the submit button is triggered, submit the subprogram for execution. Submit the sub-program to write a text label control:
<Script runat = "server"> Sub submit (sender As Object, e As EventArgs) lbl1.Text = "Your name is" & txt1.TextEnd Sub </script>
<Html> <body>
<Form runat = "server"> Enter your name: <asp: TextBox id = "txt1" runat = "server"/> <asp: button OnClick = "submit" Text = "Submit" runat = "server"/> <p> <asp: label id = "lbl1" runat = "server"/> </p> </form>
</Body>