Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Custom Validator fails to get Combobox ID

$
0
0

I am using the custom Validator as Required Field validator fails for the Ajax Combobox, but I am not able to work it out for the Combobox, howeverr when I pass the Id of another Textbox in the custom Validator control to validate option, it works fine.

Below is my code:

<ajax:ComboBox ID="Cmbx" runat="server" Width="100px" CssClass="AquaStyle textfont"
AutoPostBack="true" DropDownStyle="DropDown" AutoCompleteMode="SuggestAppend"
CaseSensitive="false" ItemInsertLocation="Append"
ValidationGroup="Validate" CausesValidation="true" />



<asp:CustomValidator ID="cvRequired" ControlToValidate="Cmbx" runat="server"
ClientValidationFunction="validate" Display="None" ValidationGroup="Validate"/>

This is not working, I checked out the issue tracker on Ajax site as well, but they said that I must append "$TextBox" in the Id and it will work, but then also it is not working.

I am not able to call a simple javascript function from the same:

function validate(sender, args) {
alert("gasfkgsjkds");
}



Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>