Sorry if this is repeated, didn't see it from my first attempt:
Ok sorry, this is a pretty common problem that I have seen numerous users post on various websites, so I thought others would know without needing to give much detail...
Anyhow...
Here's the problem...
I have a web page that I'm trying to use an Ajax Control Toolkit Combobox control with for displaying a list of values. Here is some of the aspx code:
- <cc1:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">
-
</cc1:ToolkitScriptManager>
-
-
(other stuff...)
-
-
-
<cc1:ComboBox ID="comboBox1" OnTextChangedcomboBox1_TextChanged" Width="100px" Style="vertical-align: middle;" AutoCompleteMode="Suggest" runat="server">
-
</cc1:ComboBox>
-
Here is the server side code to load the control:
- var codes = new List<Items>(Factory.GetInstance<proxy>().LookupSel ectedCodes(comboBox1.Text.ToUpper()));
-
comboBox1.Items.Clear();
-
comboBox1.Items.Add(new ListItem(string.Empty, string.Empty));
-
foreach (var code in Codes)
-
{
-
var listItem = new ListItem(code.Name, code.Name);
-
comboBox1.Items.Add(listItem);
-
}
-
comboBox1.SelectedIndex = 0;
-
comboBox1.DataBind();
-
if (Codes.Count > 1)
-
comboBox1.SelectedIndex = 1;
Hopefully when I post this it will format in a way that makes it readable.
The problem occurs when, after the combobox has been loaded, if the user highlights the first item in the list and hits either the Backspace key or the Delete key it throws a javascript error: 'this._postBackSettings.async' is null or not an object" or something similar.
Hope this helps to explain the problem...