Hi,
ofcourse it is possible. You can use
Custom Validator
. this will accept the javascript function as validation function and based on the validation you have to set IsValid to True or False.
try like this,
function fnValidate(sender,args)
{
var ddl = document.getElementById("dropdownList1");
if(ddl.options.value == "client1")
{
var txt = document.getElementById("Textbox1");
args.IsValid=true;
}
elseif(ddl.options.value == "client2")
{
var txt = document.getElementById("Textbox1");
args.IsValid=true;
}
return;
}
check
this[
^] for more on Custom validators. Set the
ClientValidationFunction
to above javascript function.
hope it helps.