R4R Team working to provide free of cost for experienced and freshers

Tutorials | Examples|Interview Questions and Answers|Java Tutorials| C Tutorials | C++ Tutorials | Spring Tutorials| Hibernate Tutorials | JSP Tutorials | Servelets Tutorials| C# Tutorials | PHP Tutorials etc , Basics | Download Software | Data Types | Variables | Constant | Storage & Classes | Operators | Decisions Making | Loops | Functions| Numbers | Arrays | Pointers | String | Datastructure | Expressions | Preprocessor Statement | I/O | Exception Handling | OOPs Tutorial | Classes and object |C++ Inheritance Overloading | Polymorphism | Abstraction | Encapsulation | Interfaces | Multithreading etc

VB.net Tutorials with Examples

VB.Net Projects

VB.Net Project 1

TextBox Control in ASP.NET
Previous Home Next

TextBox Control is used for user to enter the input like any string eg., Name, Password , number etc., Asp.NET TextBox itself is a class which is present under System.Web.UI.WebControls namespace. It is used to accept SingleLine, MultiLine or Password characters as the input.

Syntax Of Textbox

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>


Properties Discription
AutoCompleteType Specifies the AutoComplete behavior of a TextBox
AutoPostBack A Boolean value that specifies whether the control is automatically posted back to the server when the contents change or not. Default is false
CausesValidation Specifies if a page is validated when a Postback occurs.
Columns The width of the textbox.
MaxLength The maximum number of characters allowed in the textbox.
ReadOnly Specifies whether or not the text in the text box can be changed.
Rows The height of the textbox (only used if TextMode="Multiline").
runat Specifies that the control is a server control. Must be set to "server".
Text The contents of the textbox.
TextMode Specifies the behavior mode of a TextBox control (SingleLine, MultiLine or Password).
ValidationGroup The group of controls that is validated when a Postback occurs.
Wrap A Boolean value that indicates whether the contents of the textbox should wrap or not.
OnTextChanged The name of the function to be executed when the text in the textbox has changed.

.vb CODE

Protected Sub Button1_Click(ByVal sender As Object, 
ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add("Name:" + TextBox3.Text)
ListBox1.Items.Add("father Name:" + TextBox4.Text)
ListBox1.Items.Add("Course:" + TextBox5.Text)
ListBox1.Items.Add("college:" + TextBox6.Text)
End Sub


Previous Home Next