In Page_Load:
for ( int i = 0; i < 10; i++ )
{
...
cb.OnClientKeyPress = "function(){openCombobox(" + i.ToString() + ")}";
...
}
In OnSuggestOptions:
public string OnSuggestOptions( string sText, int cboIndex)
{
switch(cboIndex)
{
case 0:
....load the options for the first combobox
break;
case 1:
....load the options for the second combobox
break;
...
}
}
Client-side:
function openCombobox(cboIndex) {
ob_post.AddParam("cboIndex", cboIndex);
eval("cbo" + cboIndex + ".open()");
}
|