Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Add Custom Message to ValidationSummary in ASP.NET

leave a comment »


Following is the code you can write to put the message in validation summary while doing validation on button or on another event.

CustomValidator val = new CustomValidator();
val.IsValid = false;
val.ErrorMessage = "Custom error message to add to the ValidationSummary";

Written by Manish

November 24, 2010 at 6:20 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: