hi
my problem is, i want to validation two controls in custom validation
please any body tell me how i am perform this thing.
--------------------------------------------------------------------------------
my code in javascript is
<script language="javascript" type="text/javascript">
function validate_CheckInOutTime(source, arguments)
{
var check_in_hour = document.aspnetForm.<%=dpl_check_in_hour.ClientID%>;
var check_in_minute = document.aspnetForm.<%=dpl_check_in_minute.ClientID%>;
var zero = "0";
alert(check_in_minute.value);
if(check_in_hour == zero && check_in_minute == zero)
{
alert(zero.value);
arguments.IsValid = false;
return;
}
else
{
arguments.IsValid = true;
return;
}
document.aspnetForm.dpl_check_in_hour.focus();
}
</script>
but this does not validate
Problem in custome validaion
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Bechir BejaouiRank #144 · 15.9K pointsPosted Aug 31, 2008, 1:36 PM EDT
site1
or simply by google it Regualr expression + C#
use the IsMatch method of the Regex class
if(Regex.IsMatch(regular expresion, text or expression to check))
{
take action 1
}
else
{
take action 2
}