Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. CustomValidator myCustomValidator = new CustomValidator();
  2. myCustomValidator.ValidationGroup = "MyGroup";
  3. myCustomValidator.ErrorMessage = "This ID already exists.";
  4.  
  5. myCustomValidator.IsValid = false;
  6. Page.Validators.Add(myCustomValidator);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement