Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Showing posts with label validations. Show all posts
Showing posts with label validations. Show all posts

Regular expressions to validate file extension before file upload in javascript using asp.net

Dec 14, 2010 22 comments
Introduction:

Here I will explain how to check or validate file type in file upload control using JavaScript and regular expression to check file extension before file upload using JavaScript in asp.net.

Description:

I have one page that contains one file upload control to accept files from user and saving it in one folder. Here I need to give permission for user to upload only .doc or .docx files for that I have written validation by using JavaScript to validate files before save it in database.

Here I have some of regular expressions to validate file upload. 

Javascript validations for Email,Phone no and allow only characters, spaces, numbers in asp.net

Oct 22, 2010 17 comments
Introduction 

Here I will explain how to validate Email,phone number,to allow only characters and spaces and for allow only numbers using JavaScript validations in asp.net.

Description

I have a one sample registration form that contains fields like Name, Email, PhoneNo .
Now I want to check whether user enter correct email format or not, and phone number contains only numbers or not and name contains only characters and spaces or not by using JavaScript.

Here some of commonly used regular expressions

Javascript validations to validate form in asp.net

10 comments
Introduction 

Here I will explain how to validate form using JavaScript validations in asp.net 

Description

I have a one sample registration form that contains fields like Username, Password, Confirm Password, First Name, Last Name, Email, PhoneNo and Location.
Now I want to check whether user enter data in all fields or not and I want to check whether user enter correct data in all fields or not by using JavaScript.

If I want to check whether user enters data in textbox or not write script like this 

Calculating the difference between two dates range is 30 days in javascript or validation to Check end date is not greater than start date and two dates range is not more than 30 days using ajax and javascript in asp.net

Aug 22, 2010 3 comments
Introduction:

Here I will explain how to check end date greater than start date and check two dates difference range is 30 days or not using asp.net.

Description:

Previously I explained how to use Ajax Collapsible panel . I explained many articles on Ajax now I will explain to how to set validation to check end date greater than start date or not and check two dates difference range is 30 days using Ajax validator controls. 


how to change the error message of custom validator dynamically using asp.net

2 comments
Introduction

Here I will explain how to change the error message of custom validator dynamically using asp.net.

Description

I have one textbox, one button and one custom validator to validate the textbox whenever user clicks on button.
In customvalidator I have taken ClientValidationFunction="ClientValidationFunction" this clientside function is used to send error message dynamically by using sender object. This sender object will display ErrorMessage dynamically.


© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.