ASP.Net validation controls can be used to perform both client side validations. If the page containing a asp.net validation control is rendered in a page with Javascript disabled, the asp.net runtime creates code to automatically perform the validations in the server side.
Server side validations can be invoked using the Page.Validate() method. The status of the validation is set to the Page.IsValid property by the asp.net runtime.
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
Page.Validate();
}
}
protected void button1_Click(object sender, EventArgs e)
{
if (!Page.IsValid) return;
//Do something if validation passes.
}
This server side validation works on all major browsers. I have tested on IE, FireFox and Netscape.