Technical Training
VB.NET 2005Table of Contents
VB.NET Validation Controls
VB.NET Validation Controls - Page 2
VB.NET Validation Controls - Page 3VB.NET Validation Controls Page - 3
VB.NET Validation Controls
Enabling Controls Based on Input
One of the limitations of computer usage is the limitation of area that can be viewed at a given point in time. This puts the stress on visually arranging the various controls on the surface area of the screen. This disadvantage is further enhanced if the data entry in one control is incumbent upon data entry to be made in another control. One solution that is offered for overcoming this limitation is the enabling of the visible properties of the control in the event handling code wherein decision making information is being captured.
Let us examine a situation where a user is trying to access some information in an application. Only data entry screen is allowed for clerks and reports alone can be accessed by the mangers. If you are neither a manager nor a clerk you cannot proceed further.
In a new project, add three radio buttons and four buttons and arrange them as in the following picture:
Add the following codes:
Now press F5 to execute the program. The following three screenshots show the three states of the program.



Other properties for Validation
The CharacterCasing Property
This is a property of control. It can have one of the following three values:
1. Lower auto converts all the values to lower case
2. Upper auto converts all the values to upper case
3. Normal takes the value as typed by the user.
The MaxLength Property
You can use MaxLength property to set or get the maximum number of characters allowed in the text box. You can use RequiredFieldValidator and RangeValidator to validate this property. The following code snippet shows the method of validation:
In this lesson we have looked at Exceptions and type of Exception handling routines that are available in VB.NET. In the next lesson we shall be talking of the process of Creating and Managing Components and .NET Assembly.
VB.NET 2005
- VB.NET 2005 Free Training
- The .NET Framework Architecture Part 1
- The .NET Framework Architecture Part 2
- Application Class and Message Class
- Implementing Class Library Object
- Visual Studio.NET Namespaces
- .NET Assemblies
- Differences between VB.NET 1.0 and VB.NET 2.0
- Introducing VB.NET Windows Forms
- Visual Studio Windows Forms Designer
- Exploring the Forms Designer generated code
- Setting and Adding Properties to Windows Form
- Implementing Inheritance
- Event Handling In Visual Basic .NET
- Building Graphical Interface elements
- .NET Common Windows Forms Controls Part 1
- .NET Common Windows Forms Controls Part 2
- Common Controls and Handling Control Events
- DomainUpDown and NumericUpDown Controls
- Dialog Boxes in Visual Basic .NET
- Visual Studio Adding Controls to Windows Form
- VB.NET Validation Controls
- Working with Menu Controls
- VB.NET MDI Applications
- .NET Exceptions
- VB.NET Creating and Managing Components Part 1
- VB.NET Creating and Managing Components Part 2
- Simple Data Binding
- .NET Complex Data Binding
- .NET Data Form Wizard
- Data Manipulation with ADO.NET
- SQL Server Stored Procedures
- SQL Server Ad Hoc Queries
- Finding and Sorting Data in DataSets
- ADO.NET Object Model
- Working with DataSets
- Using XML Data
- Working with File System in .NET
- Creating Web Service
- Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
- Web Reference and Web Services
- Web Services - SOAP, WSDL, Disco and UDDI
- Web Application Testing in VB.NET 2005
- Web Application Tracing and Debugging
- Working with Legacy Code and COM Components
- ActiveX Controls and Legacy Code
- Windows Application Testing
- VB.NET Windows Application Testing
- Tracing VB.NET Windows Application
- Debugging Windows Applications In Visual Studio.NET 2005
- Deploying Windows Applications In Visual Studio.NET 2005
- Customizing Setup Project in Visual Studio.NET 2005
- Shared Assembly
- Microsoft .NET Creating Installation Components
- The Registry Editor in Visual Studio.NET 2005
- The File Types Editor







