1.) To "pre-filter" the data from a large table i do this in the
WebDropDown1_ItemsRequested - Event:
this.SqlDataSource1.SelectCommand = string.Format("SELECT IDX,PARAMETER FROM MASTER.K_PARAMETER WHERE PARAMETER LIKE '{0}%'", e.Value.ToString().ToUpper()); this.WebDropDown1.DataBind();so far so good, it works
2.) I've selected a value in the WebDropDown
3.) I fire a WebImageButton1_Click ... Event this.WebTextEdit1.Text = this.WebDropDown1.SelectedItem.Text;4.) Error: SelectedItem.Text is null
kind regards
Hello Andreas,
Thanks for your feedback. I have attached a WebSite project where I have a WebDropDown and WebTextEdit, and select and item, then click the "Set Text" button which does a postback, and the selectedItem.Text is correcty set in the WebTextEdit input box.
Maybe you have EnableMultipleSelection=true ? In that case SelectedItem will always be null, and you will need to refer to the SelectedItems collection property (if only one item is selected, your item will be in WebDropDown1.SelectedItems[0], and will be the same thing as WebDropDown1.SelectedItem).
I hope this helps.
Regards,
Angel
Thanks for your answer.
I set it to SelectItems[0].Text and get now an ArgumentOutOfRange-Exception.
I've send you a PDF with screenshots an the code.