2011-02-02 56 views
1

如何獲取ClientValidationFunction屬性中標識的JavaScript函數中的值,該屬性是在asp:CustomValidator控件的ControlToValidate屬性中標識的控件中輸入的?從ControlValidate控件中的ControlToValidate屬性中的控件提取值?

function MyValidateFunction(sender, args) { 
    //want to get value of MyControl  
} 

<asp:CustomValidator 
    ID="cvAlarmedLocationAddress" 
    runat="server" 
    ControlToValidate="MyControl" 
    ClientValidationFunction="MyValidateFunction" 
    Text="" 
/> 

回答

相關問題