Msgbox and Errorprovider
Msgbox and Errorprovider
MessageBox
• It is a special dialogbox used to display the
information to the user
• It shows custom images to the user
parameters of message box:
1 Icon
2 Title
3 Buttons
1 Icon : to display icon like
critical,question,information and exclamation
2 Title: we can give a title to the message box
3 Buttons : we can display more than 1 buttons
with MsgBoxStyle option.
Error Provider
• Error provider is used to set validation errors.
• If user inputs wrong data ,it allows you to set
error message for a control.
Regular Expressions
• A regular expression is a pattern that could be
matched against inputted data,
RegularExpressions is also a namespace.
• The Regex is a class used for representing
regular expression.
Methods
• Public Function IsMatch(input as String) As Boolean
• Public Function IsMatch(input as String,startat Integer)
As Boolean
• Public Shared Function IsMatch(input as String,pattern
as String)As Boolean
• Public Function Matches(input as String) As
MatchCollection
• Public Function Replace(input as String,replacement as
String)As String
• Public Function Split(input as String ) As String()l
Expression Description
[a-z] Accept any character from a to z
[^a-z] Not Accepts any character from a-z
[0-9] Accept any digit from 0 to 9
End If
End Sub
End Class
WAP to validate Username and pwd
Imports System.Text.RegularExpressions
End If
End If
If isvalid = True And isvalid1 = True Then
MsgBox("welcome")
End If
End Sub
End Class
WAP to validate email and mobile no
Imports System.Text.RegularExpressions
End If
End If
If isvalid = True And isvalid1 = True Then
MsgBox("welcome")
End If
End Sub
End Class