title: making some items unselectable in dropdownlist using asp.net?
body: <p>Dropdownlist i binded the values but in that dropdownlist just like group means(<strong>employee,nonemployee</strong>)  so that <strong>items value</strong> is empty(""), so i can use databound event split the two fileds ,that two fields i can apply the color and underline and bould and <strong>user doesnot select that fields</strong> , so pls see the below code and modify this code.</p>
  
  <pre><code>protected void ddlconsultant_DataBound(object sender, EventArgs e) { foreach (ListItem item in ((DropDownList)sender).Items) {
  
  string r = item.Value; if (r == "") {
  
  item.Attributes.Add("style", "color:Red;font-weight:bolder"); } }
  </code></pre>
  
  <p>thanks
  hemanth</p>