ASP.NET - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

ASP.NET TextBox

ASP.NET TextBox

shape Description

In ASP.NET TextBox, control is used to create text box to provide a text area to the user. Generally, in forms one can find a lot of textboxes. Where, end user provides the text input.

shape Conceptual figure

Basic structure of TextBox is as shown below. [html]<asp:TextBox ID="sptxtBox" runat="server"></asp:TextBox>[/html] For the 'Name' textbox the interaction diagram is stated below.

shape Attributes

TextBox has lot of attributes in it. TextMode, rows, columns are the attributes, one use mainly.
  • TextMode="multiline" - One can use this for any address or description type input, where user has to provide the inputs in multiple lines. [html] <asp:TextBox id="spTextBox" TextMode="multiline" runat="server" /> [/html]
  • TextMode="password" - One can use this where the input type is password. [html] <asp:TextBox id="spTextBox" TextMode="password" runat="server" /> [/html]

shape Example

Below is the example of a textbox, followed by the interaction diagram.

shape Conceptual figure

In this form for entering 'Name','Address' and 'Password'. One have been provided with textboxes like.