Click here to Skip to main content
15,889,424 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Bind Datalist Control in another datalist control Pin
deepaks331-Jul-06 23:15
deepaks331-Jul-06 23:15 
GeneralRe: Bind Datalist Control in another datalist control Pin
_AK_31-Jul-06 23:19
_AK_31-Jul-06 23:19 
GeneralRe: Bind Datalist Control in another datalist control Pin
deepaks331-Jul-06 23:22
deepaks331-Jul-06 23:22 
GeneralRe: Bind Datalist Control in another datalist control Pin
_AK_31-Jul-06 23:24
_AK_31-Jul-06 23:24 
Questionchecking the string Pin
Mairy31-Jul-06 22:18
Mairy31-Jul-06 22:18 
AnswerRe: checking the string Pin
MHASSANF31-Jul-06 22:31
MHASSANF31-Jul-06 22:31 
AnswerRe: checking the string Pin
Exelioindia31-Jul-06 22:59
Exelioindia31-Jul-06 22:59 
AnswerRe: checking the string Pin
Vipin Venugopal31-Jul-06 22:59
Vipin Venugopal31-Jul-06 22:59 
the best way to do email validation is by using java script.
Just cut and paste the following java script. it will work fine.

<html>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function emailCheck (emailStr) {
var checkTLD=1;
var
knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|in
fo|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
alert("Email address seems incorrect (check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
}
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
}
}
if (user.match(userPat)==null) {
alert("The username doesn't seem to be valid.");
return false;
}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
}
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The domain name does not seem to be valid.");
return false;
}
}
if (checkTLD && domArr[domArr.length-1].length!=2 &&
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " +
"country.");
return false;
}
if (len<2) {
alert("This address is missing a hostname!");
return false;
}
return true;
}
</script>
</HEAD>
<BODY>
<form name=emailform onSubmit="return emailCheck(this.email.value)">
Your Email Address: <input type=text name="email"><br>
<input type=submit value="Submit">
</form>
</body>
</html>

Vipin
GeneralRe: checking the string Pin
J4amieC1-Aug-06 0:07
J4amieC1-Aug-06 0:07 
QuestionPopulating ShoppingCart Pin
Jay_se31-Jul-06 21:46
Jay_se31-Jul-06 21:46 
QuestionString constants must end with a double quote Pin
kirthikirthi31-Jul-06 20:19
kirthikirthi31-Jul-06 20:19 
AnswerRe: String constants must end with a double quote Pin
_AK_31-Jul-06 21:05
_AK_31-Jul-06 21:05 
AnswerRe: String constants must end with a double quote Pin
Guffa31-Jul-06 21:06
Guffa31-Jul-06 21:06 
GeneralRe: String constants must end with a double quote Pin
_AK_31-Jul-06 21:24
_AK_31-Jul-06 21:24 
GeneralRe: String constants must end with a double quote Pin
kirthikirthi31-Jul-06 21:24
kirthikirthi31-Jul-06 21:24 
GeneralRe: String constants must end with a double quote Pin
_AK_31-Jul-06 21:33
_AK_31-Jul-06 21:33 
GeneralRe: String constants must end with a double quote Pin
kirthikirthi31-Jul-06 22:24
kirthikirthi31-Jul-06 22:24 
GeneralRe: String constants must end with a double quote Pin
_AK_31-Jul-06 22:49
_AK_31-Jul-06 22:49 
Questionhtml controls access on server side?? Pin
TintinV3ck31-Jul-06 20:03
TintinV3ck31-Jul-06 20:03 
AnswerRe: html controls access on server side?? Pin
_AK_31-Jul-06 20:06
_AK_31-Jul-06 20:06 
GeneralRe: html controls access on server side?? Pin
TintinV3ck31-Jul-06 20:14
TintinV3ck31-Jul-06 20:14 
GeneralRe: html controls access on server side?? Pin
_AK_31-Jul-06 20:15
_AK_31-Jul-06 20:15 
GeneralRe: html controls access on server side?? Pin
TintinV3ck31-Jul-06 20:18
TintinV3ck31-Jul-06 20:18 
GeneralRe: html controls access on server side?? Pin
_AK_31-Jul-06 20:29
_AK_31-Jul-06 20:29 
GeneralRe: html controls access on server side?? Pin
JustForLive31-Jul-06 23:52
JustForLive31-Jul-06 23:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.