Row Edit event handler issue
<pre><code>&lt;asp:GridView ID="GridView1" runat="server"  
        style="height: 121px; width: 175px" BackColor="White" 
        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        onrowediting="GridView1_RowEditing" AutoGenerateColumns="false"&gt;
        &lt;Columns&gt;
        &lt;asp:CommandField ButtonType="Button" SelectText="Edit" ShowEditButton="true" /&gt;
        &lt;asp:TemplateField&gt;
        &lt;ItemTemplate&gt;
        &lt;asp:Label ID="lblId" runat="server" Text='&lt;%# Eval("Id") %&gt;'&gt;&lt;/asp:Label&gt;
        &lt;/ItemTemplate&gt;
        &lt;EditItemTemplate&gt;
            &lt;asp:TextBox ID="TextBox1" runat="server" Text='&lt;%# Eval("Id") %&gt;'&gt;&lt;/asp:TextBox&gt;
        &lt;/EditItemTemplate&gt;

        &lt;/asp:TemplateField&gt;

        &lt;asp:TemplateField&gt;
        &lt;ItemTemplate&gt;
        &lt;asp:Label ID="lblCpuName" runat="server" Text='&lt;%# Eval("cpuname") %&gt;'&gt;&lt;/asp:Label&gt;
        &lt;/ItemTemplate&gt;
        &lt;EditItemTemplate&gt;
            &lt;asp:TextBox ID="TextBox2" runat="server" Text='&lt;%# Eval("cpuname") %&gt;'&gt;&lt;/asp:TextBox&gt;
        &lt;/EditItemTemplate&gt;
        &lt;/asp:TemplateField&gt;



        &lt;asp:TemplateField&gt;
        &lt;ItemTemplate&gt;
        &lt;asp:Label ID="lblStatus" runat="server" Text='&lt;%# Eval("status") %&gt;'&gt;&lt;/asp:Label&gt;
        &lt;/ItemTemplate&gt;
        &lt;EditItemTemplate&gt;
            &lt;asp:TextBox ID="TextBox3" runat="server" Text='&lt;%# Eval("status") %&gt;'&gt;&gt;&lt;/asp:TextBox&gt;
        &lt;/EditItemTemplate&gt;
        &lt;/asp:TemplateField&gt;

        &lt;/Columns&gt;

    &lt;/asp:GridView&gt;


protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
        {
            SqlDataSource1.UpdateCommandType = SqlDataSourceCommandType.Text;
            GridViewRow row = GridView1.Rows[e.NewEditIndex];
            TextBox txt = (TextBox)row.FindControl("TextBox2");
            SqlDataSource1.UpdateParameters["CpuName"].DefaultValue = txt.Text;
            SqlDataSource1.UpdateParameters["cpuid"].DefaultValue = "3";
            SqlDataSource1.Update();
            BindGridView();

        }
</code></pre>

<p>I am getting a object reference not set to an object on the textbox txt. I am not able to get the textbox2 in my gridview.</p>
