To make the validators on a page visible by default you can call the
page’s Validate() method when it is loading, as in:
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { Page.Validate(); } } |
Or if you want to make visible only one validator, use:
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { // Where reqEmail is the validator reqEmail.Validate(); } } |