title: Validator for drop down list in asp.net
body: <p>I have a drop down list which I am loading from the server side.</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddlOne" runat="server"  CssClass="dropDrownClass" Width="80%"&gt;
  </code></pre>
  
  <p>In server side, after loading the drop down I am adding </p>
  
  <blockquote>
    <p>-- Please Select --</p>
  </blockquote>
  
  <p>I want to make sure that if that is selected than I would display the error message. For that I have written</p>
  
  <pre><code>&lt;asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToValidate="ddlOne" ValueToCompare="-- Please Select --" Operator="Equal"  Type="String"   ErrorMessage="CompareValidator"&gt;&lt;/asp:CompareValidator&gt;
                          &lt;asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="CompareValidator1" runat="server"&gt;
                          &lt;/asp:ValidatorCalloutExtender&gt;
  </code></pre>
  
  <p>But it is showing me the error message whenever I am selecting anything in the drop down list. 
  and when I changed the validator to</p>
  
  <pre><code>&lt;asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToValidate="ddlOne" ValueToCompare="0" Operator="Equal"  Type="Integer"  ErrorMessage="CompareValidator"&gt;&lt;/asp:CompareValidator&gt;
  </code></pre>
  
  <p>I am getting the error message on every selection, except the first which is -- Please Select -- .</p>
  
  <p>Please let me know how to validate the fist item of dropdown list</p>
  
  <p><strong>ISSUE 2</strong></p>
  
  <p>I am getting dual message, one under the dropdown list [which is showing error "Carson63000" in red] and one as a pop up [validator call out]. Same message.
  I want that only validator callout should display the message.</p>