0% found this document useful (0 votes)
9 views5 pages

Working Validation Control (Pick The Date)

The document describes a working validation control program that validates user input. The program contains coding for a submit button click event that checks if the page is valid and displays a message labeling the user's textbox input. It also contains a custom validator that validates a card number field and returns true if it matches a specific number. The output and result sections indicate the validation control program was performed successfully.

Uploaded by

Amutha Arun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Working Validation Control (Pick The Date)

The document describes a working validation control program that validates user input. The program contains coding for a submit button click event that checks if the page is valid and displays a message labeling the user's textbox input. It also contains a custom validator that validates a card number field and returns true if it matches a specific number. The output and result sections indicate the validation control program was performed successfully.

Uploaded by

Amutha Arun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

WORKING VALIDATION CONTROL

12PA01

[Pick the date]

Page 1

WORKING VALIDATION CONTROL

[Pick the date]

CODING
~~~~~~~~

Partial Class _Default


Inherits System.Web.UI.Page
Protected Sub submitbutton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles SubmitButton.Click
If Page.IsValid = True Then
MessageLabel.Text = "hello" + TextBox1.Text
MessageLabel.Visible = True
End If
If Page.IsValid = True Then
MessageLabel.Text = "Thankyou " + TextBox1.Text + "Your book have been
issued"
MessageLabel.Visible = True
End If
End Sub

Protected Sub CardNumberCustomValidator_ServerValidate(ByVal source As Object,


ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles
CardNumberCustomValidator.ServerValidate
If args.Value = "KBL77777" Then
args.IsValid = True
Else
args.IsValid = False
End If
End Sub
End Class

12PA01

Page 2

WORKING VALIDATION CONTROL

[Pick the date]

OUTPUT
~~~~~~~~

12PA01

Page 3

WORKING VALIDATION CONTROL

12PA01

[Pick the date]

Page 4

WORKING VALIDATION CONTROL

[Pick the date]

Result
~~~~~
Thus the working validation control program was perform successfully.

12PA01

Page 5

You might also like