title: Prevent Postback for DropDown for first value in asp.net webform
body: <p>I have  simple webform with search and other filter.</p>
  
  <p>Search is triggered when user click on the Search Button and filter is trigger based on dropdown change.</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>    &lt;div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"&gt;
      &lt;asp:TextBox ID="txtSearch" runat="server" placeholder="SEARCH" CssClass="form-control search-text"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="btn search-btn" /&gt;
      &lt;/div&gt;
  
  
  &lt;div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 "&gt;
  &lt;asp:DropDownList ID="ddCategory" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="ddCategory_SelectedIndexChanged"  runat="server"  DataTextField="Name" DataValueField="ID" &gt;
  &lt;/asp:DropDownList&gt;
  &lt;asp:RequiredFieldValidator id="rfvdd" runat="server" ErrorMessage=""  ControlToValidate="ddCategory" InitialValue="0" ValidationGroup="ddCategory"&gt;
  &lt;/asp:RequiredFieldValidator&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>CODE BEHIND</strong></p>
  
  <pre><code>String strSql = "SELECT ID, Name FROM  Category ORDER BY Name ASC";
  DataSet ds = new DataSet();
  ds = DataProvider.Connect_Select(strSql);
  ddCategory.DataSource = ds;
  ddCategory.DataBind();
  ddCategory.Items.Insert(0, new ListItem("CATEGORY", "0"));
  </code></pre>
  
  <p>Using code i as 0 value to Category in <code>ddCategory</code> and i dont want to trigger postback when user select Category as an option in <code>ddCategory</code> dropdown.</p>
  
  <p>At present when even i select a value postback happens event if it is the first value in the dropdown <code>Category</code> with value <code>0</code></p>
  
  <p>How can i avoid such postback</p>