title: how to override a gridviews event inside a usercontrol in asp.net web application
body: <p>This is my usercontrol</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Grid.ascx.cs" Inherits="WSMP.UserControls.Grid" %&gt;
  &lt;a href="#" id="lbtnAhref" runat="server"&gt;New&lt;/a&gt;
   &lt;a href="#" id="lbtnADel" runat="server"&gt;
      Delete&lt;/a&gt;
  &lt;asp:DropDownList ID="ddlSearchBy" runat="server"&gt;
  &lt;/asp:DropDownList&gt;
  &lt;asp:TextBox ID="txtSearchBy" runat="server"&gt;&lt;/asp:TextBox&gt;
  &lt;asp:Button ID="btnSearchBy" runat="server" Text="Search" OnClick="btnSearchBy_Click" /&gt;
  &lt;asp:GridView ID="grdGridView" runat="server" AutoGenerateColumns="true" AllowPaging="True"
      OnPageIndexChanging="grdGridView_PageIndexChanging" PageSize="50" 
      onrowdatabound="grdGridView_RowDataBound"&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>2 href, 1 dropdownlist, 1 button
  1 grid.</p>
  
  <p>My plan is to use this grid in multiple places or multiple pages. So how can I override the RawDataBound of this grid in my page?
  Suppose in Page1 if I want to do certain condition, then I will rite in Page1.aspx.cs
  For Page2 , I dont need to do that. Hope you got the idea.</p>