find control in grid view
<p>I had code to find label in gridview and I checked on it,s label text and it gives me the index not text and this error apear object refrence not set to ..... so I wnat to give CU.Username = LBL.Text; text  no index of control
code </p>

<pre><code>protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{                
    LblRseult.Visible = true;
    LblRseult.Text = "Successfully Process";
}

protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
    cUser CU = new cUser(this);

    LBL = (Label)GridView1.Rows[e.RowIndex].Cells[1].FindControl("Label1");
    CU.Username = LBL.Text;
    if (CU.BasiclyExists())
    {
        LblRseult.Visible = true;
        LblRseult.Text = "This user already exists";
    }     
}
</code></pre>
