title: How to Highlight a search text in a drop down list
body: <p>I have a <code>Textbox</code> and a drop down list in my webpage. when I enter a text in <code>TextBox</code>  and  its <code>TextChanged</code> event is fired items containing that text are loaded into another dropdown list below.I had set dropdown state to Openloadondemand to <code>true</code>.<br>
  I need to highlight that search text inside the dropdown list items only, but I am unable to do so.</p>
  
  <p>I have got codes from <a href="http://www.aspdotnet-suresh.com/2011/12/search-records-in-gridview-and.html" rel="nofollow">here</a> and I tried to implement it in my page.</p>
  
  <p>Codes are</p>
  
  <p>Style.css</p>
  
  <pre><code>&lt;style type="text/css"&gt;
  .highlight 
  {
  text-decoration:none; font-weight:bold;color:black; background:yellow;
  
  } 
  </code></pre>
  
  <p>cs code</p>
  
  <pre><code> protected void txtItemCode_TextChanged(object sender, EventArgs e)
     {
       //my code
       ddl_ItemName.OpenDropDownOnLoad = true;
       HighlightText(itemtext);
     }
  
   public string HighlightText(string InputTxt)
     {
       Regex RegExp = new Regex(InputTxt.Replace(" ", "|").Trim(),     RegexOptions.IgnoreCase);
       return RegExp.Replace(InputTxt, new MatchEvaluator(ReplaceKeyWords));
     }
   public string ReplaceKeyWords(Match m)
     {
      return ("&lt;span class=highlight&gt;" + m.Value + "&lt;/span&gt;");
     }
  </code></pre>
  
  <p>My Design  is</p>
  
  <pre><code>&lt;table&gt;
     &lt;tr&gt;
       &lt;td class="label"&gt;Item Code : &lt;/td&gt;
       &lt;td style="width: 180px;" class="field"&gt;
         &lt;telerik:RadTextBox ID="txtItemCode" AutoPostBack="true" runat="server" 
          ontextchanged="txtItemCode_TextChanged" &gt;
         &lt;/telerik:RadTextBox&gt;
       &lt;/td&gt; 
    &lt;/tr&gt;
    &lt;tr&gt;
     &lt;td class="label"&gt;Item Name : &lt;/td&gt;
     &lt;td class="field"&gt;
       &lt;telerik:RadComboBox ID="ddl_ItemName" AutoPostBack="true" runat="server"
         EmptyMessage="Choose an Item"
         EnableLoadOnDemand="True" MarkFirstMatch="true" 
         onselectedindexchanged="ddl_ItemName_SelectedIndexChanged" &gt;               
       &lt;/telerik:RadComboBox&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>