How should I validate if my AJAX ComboBox
contains text? I have tried with the ASP.NET RequiredFieldValidator
but it dosen't work.
Asked
Active
Viewed 1,767 times
0

Nima Derakhshanjan
- 1,380
- 9
- 24
- 37

Jonas
- 3,155
- 5
- 35
- 55
-
Seems like this is a reported issue for the Ajax Combobox: http://ajaxcontroltoolkit.codeplex.com/workitem/24338 The reporting users second problem are the same problem i have. – Jonas Dec 02 '10 at 11:49
1 Answers
0
If found a solution here: http://ajaxcontroltoolkit.codeplex.com/workitem/24417
Had to add javascript to change the controltovalidate property for the internal textbox.
string script = string.Format(@"if({0}) {0}.controltovalidate = ""{1}_TextBox"";", this.reqValidator.ClientID, this.ddlCombo.ClientID);
ScriptManager.RegisterStartupScript(this, this.GetType(), string.Format("validator trick for {0}", this.ClientID), script, true);

the_lotus
- 12,668
- 3
- 36
- 53