I have a combobox with values binded from a database
I add an empty item in the first index
then i need to check if the item selected is not that one
The condition is always true whatever the item is selected. What's wrong?...
ddlfichatipo is my drop down list.
I add an empty item in the first index
Code:
ddlFichaTipo.DataBind(); ListItem emptyitem = new ListItem(null, null); ddlFichaTipo.Items.Insert(0, emptyitem);
Code:
if(ddlFichaTipo.SelectedValue != null) gridselect += " and ficha.FichatipoID = " + ddlFichaTipo.SelectedValue;
ddlfichatipo is my drop down list.
Comment