VB.Net - SPLessons

VB.Net Basic Controls

Home > Lesson > Chapter 20
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

VB.Net Basic Controls

VB.Net Basic Controls

shape Description

Control is an Object. In the aspect of VB.Net, Control is a User Interface Element which is used to place in the VB.Net Form to perform some action.By using controls developer can drag them into the form and validation code of the chosen control needs to be written  by the developer .Every control has three features in VB.Net.

shape Conceptual figure

Properties

shape Description

In VB.Net, Every Control has its own properties which describing about the control. Properties are two types as follows. In VB.Net, We can access properties in two ways as follows. By using Property Window:When we create a new  windows or web application, then we automatically get a properties Window which contains different properties.If you are unable to see the property Window. then Go to View->Properties Window or press f4 in your keyboard.The following figure shows you the properties window. By Using Code:We can write the code in the code form i.e Example.aspx.vb file.Follow the below syntax to access  property through code. [vbnet]Object.PropertyName = Value[/vbnet] Following is an Example to know how to access the property. [vbnet]btnSubmit.Text="Submit"[/vbnet]

shape Basic Controls

All the below-mentioned controls reside in a box called ToolBox. ToolBox will open automatically when we create a new web or windows application. If you are unable to see the ToolBox, then Go to View and then Click on ToolBox. ToolBox will look like as shown in the below figure. The following table shows you different mostly used controls in the VB.Net.
Control Name Description
Text Box Used to give the input and to display the text
Label Used to display the Text
Button Used to perform some action
CheckBox Used to select multiple items from the list
Radio Button Used to select one item from the list
DropDownList Used to select items from the list
ListBox Used to display the list of items at a time
Image Used to display an image
Image Button Used to display an image and also to perform an action
Link Button Used to redirect from one page another page
Panel Used to hold list of controls
CheckBox List Used to give multiple items in one control
RadioButton List Used to give multiple items in one control
GridView Used to display the backend database in the front view

Summary

shape Points

  • Object will be described by property.
  • All the controllers will have  drag and drop feature.
  • Validation to the controllers will be written by developers.