Wednesday, April 28, 2010

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.

5 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.

Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'

Exception: Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'...