I can not find the controls of lblCategoryName and ddlBlogCategoty the Edit button click in Gridview
<p>How can I find the controls <code>lblCategoryName</code> and <code>ddlBlogCategory</code>?</p>

<p>Here is my code:</p>

<pre><code>protected void grdRetailStore_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            Label lblAccount = (Label)e.Row.FindControl("lblCategoryName");
            string s = lblAccount.Text;
            DropDownList ddlBlogCategory =    (DropDownList)e.Row.FindControl("ddlBlogCategoty");
            DAO.DAO dao_category = new DAO.DAO();
            DataTable dt_blog_cat = dao_category.SelectCategory();
            if (ddlBlogCategory != null)
            {
                //  ddlBlogCategory.Items.Clear();
                ddlBlogCategory.DataSource = dao_category.SelectCategory();
                ddlBlogCategory.DataTextField = "CategoryName";
                ddlBlogCategory.DataValueField = "BlogCategoryID";
                ddlBlogCategory.DataBind();
            }
        }
    }


 &lt;asp:GridView ID="grdRetailStore" runat="server" AutoGenerateColumns="false"   DataKeyNames="PortalId" OnRowEditing="grdRetailStore_RowEditing"
                 OnRowCancelingEdit="grdRetailStore_RowCancelingEdit"      OnRowDataBound="grdRetailStore_RowDataBound"&gt;
                &lt;Columns&gt;

                    &lt;asp:TemplateField HeaderText="ID"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:Label ID="lblId" runat="server" Text='&lt;%# Bind("PortalId") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblId" runat="server" Text='&lt;%# Bind("PortalId") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;
                    &lt;/asp:TemplateField&gt;

                    &lt;asp:TemplateField HeaderText="AdvertiserName"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:TextBox ID="txtAdvName" runat="server" Text='&lt;%# Bind("AdvertiserName") %&gt;'&gt;&lt;/asp:TextBox&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblAdvName" runat="server" Text='&lt;%# Bind("AdvertiserName") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;
                    &lt;/asp:TemplateField&gt;

                    &lt;asp:TemplateField HeaderText="PromoCategory"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                           &lt;%-- &lt;asp:DropDownList ID="" runat="server" DataTextField="Account_Name" DataValueField="Account_Id"
                                AppendDataBoundItems="true"&gt;
                                &lt;%-- &lt;asp:ListItem Selected="True" Text="---Select---" Value="0"&gt;&lt;/asp:ListItem&gt;&lt;/asp:DropDownList&gt; --%&gt;
                          &lt;asp:TextBox ID="txtPromoCat" runat="server" Text='&lt;%# Bind("PromoCatId") %&gt;'&gt;&lt;/asp:TextBox&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblPromoCat" runat="server" Text='&lt;%# Bind("PromoCatId") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;

                    &lt;/asp:TemplateField&gt;

                     &lt;asp:TemplateField HeaderText="Start Date"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:TextBox ID="txtPromostartdate" runat="server" Text='&lt;%# Bind("PromoStartDate") %&gt;'&gt;&lt;/asp:TextBox&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblPromostartdate" runat="server" Text='&lt;%# Bind("PromoStartDate") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;

                    &lt;/asp:TemplateField&gt;

                     &lt;asp:TemplateField HeaderText="End Date"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:TextBox ID="txtPromoenddate" runat="server" Text='&lt;%# Bind("PromoEndDate") %&gt;'&gt;&lt;/asp:TextBox&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblPromoenddate" runat="server" Text='&lt;%# Bind("PromoEndDate") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;

                    &lt;/asp:TemplateField&gt;



                    &lt;asp:TemplateField HeaderText="Html Code"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:TextBox ID="txtHtml" runat="server" Text='&lt;%# Bind("HtmlCode") %&gt;'&gt;&lt;/asp:TextBox&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblHtml" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;

                    &lt;/asp:TemplateField&gt;

                    &lt;asp:TemplateField HeaderText="CategoryName"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                           &lt;asp:DropDownList ID="ddlBlogCategoty" runat="server" DataTextField="CategoryName" DataValueField="BlogCategoryID"
                                AppendDataBoundItems="true"&gt;
                                 &lt;asp:ListItem Selected="True" Text="---Select---" Value="0"&gt;&lt;/asp:ListItem&gt;&lt;/asp:DropDownList&gt;
                           &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:Label ID="lblCategoryName" runat="server" Text='&lt;%# Bind("CategoryName") %&gt;'&gt;&lt;/asp:Label&gt;
                        &lt;/ItemTemplate&gt;

                    &lt;/asp:TemplateField&gt;

                    &lt;asp:TemplateField HeaderText="Edit" ShowHeader="False"&gt;
                        &lt;HeaderStyle Width="100px" Wrap="False" /&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:LinkButton ID="lbkUpdate" runat="server" CausesValidation="True" CommandName="Update"
                                Text="Update" OnClientClick="return ValidateUpdate();"&gt;&lt;/asp:LinkButton&gt;
                            &lt;asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="Cancel"&gt;&lt;/asp:LinkButton&gt;
                        &lt;/EditItemTemplate&gt;

                        &lt;ItemTemplate&gt;
                            &lt;asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="Edit"&gt;&lt;/asp:LinkButton&gt;
                        &lt;/ItemTemplate&gt;
                    &lt;/asp:TemplateField&gt;
                &lt;/Columns&gt;
                &lt;/asp:GridView&gt;
</code></pre>
