bemara57
asked on
Custom Validator and Client-Side function question
I have a custom validator that checks the "ControlToValidate" input text against a javscript function. This is what I have so far:
<asp:TextBox ID="createFileText" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="Some error, try again."
ClientValidationFunction=" CheckFileE xists"
ControlToValidate="createF ileText" />
JS Function:
function CheckFileExists(sender, args)
{ ?? alert(sender.ControlToVali date) ?? }
In the javscript function, I'm trying to get the name of the ControlToValidate from the sender, expecting "createFileText" back. I tried sender.ControlToValidate but got an undefined error. Is this possible?
<asp:TextBox ID="createFileText" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="Some error, try again."
ClientValidationFunction="
ControlToValidate="createF
JS Function:
function CheckFileExists(sender, args)
{ ?? alert(sender.ControlToVali
In the javscript function, I'm trying to get the name of the ControlToValidate from the sender, expecting "createFileText" back. I tried sender.ControlToValidate but got an undefined error. Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER