I was using the old version of Ajax (1.4.5...) and after upgrading to 1.4.609.. my ajax combobox code is throwing a nullreference error. I think it's now having trouble finding TextBox control portion of the combobox, but I'm not sure. Has anyone else had this problem? and more importantly, has anyone found a solution for it? Here is the code:
public Unit LocationCellWidth
{
get { return ComboBoxCell.Width; }
set
{
ComboBoxCell.Width = value;
error------> ((TextBox)LocationComboBox.FindControl("TextBox")).Width = value;
//LocationComboBox.Width = value;
}
}
Thanks!
Better late then never, I just had the same issue.
The control name has changed to: "SelectCategoryCombo_TextBox"
inspecting the combobox object in the debugger gives you the above ID for the textbox control.
so:
TextBox comboTextBox = LocationComboBox.FindControl("SelectCategoryCombo_TextBox") as TextBox
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.