Validation control not work in FireFox or other browser

When I use validation control on asp.net it works for IE fine but failed to work in Firefox. After goggling I will find the solution. I share this code here, hope it may help others.

The ASP.Net validations controls only work client side in IE.
You can make them work in other browsers, coding as below:

C#

Page.Validate();

if ( !Page.IsValid )
{
return;
}
//Continue Your code

VB.NET

Page.Validate()

If Not Page.IsValid Then
Return
End If
'Continue Your code


Have a nice day.

Comments

miraj said…
But where can I put this c# code in my asp.net website?
miraj said…
But where can I put this c# code in my asp.net website?
Carter Coleman said…
By verifying type information while the customer is stuffing it out, the customer can know instantly if they've created any mistakes.
Davis Harper said…
NET programmers have far more possibilities to earn a steady income as of late. As a developer of the platform, I see to it that I'm usually updated using the present tools and methods.
Davis Harper said…
NET programmers have far more possibilities to earn a steady income as of late. As a developer of the platform, I see to it that I'm usually updated using the present tools and methods.

Popular posts from this blog

The model backing the 'MyDBContext' context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate the database, and optionally seed it with new data.

How can I get a value of a property from an anonymous type (C#)

Check/Uncheck all items in a CheckBoxList using Javascript