Find a server side control inside a empty template of a grid view without row data bound event
<p>I have a Grid view in which a text box is present in footer and edit template from where user can update data. i  made a table inside a empty template of a grid and add a server side text box on it so that user can insert data in a grid if there is no record present inside a grid.
There is a server side button present out side the grid, on clicking of that button i m saving  the data that user insert or update via grid. Now i am facing the problem to find out the control present inside the empty template of the grid while i m saving the data.</p>

<p>My code looks like as :</p>

<pre><code>&lt;asp:GridView ID="grwBrandInfo" runat="server" Width="100%" HeaderStyle-CssClass="gridheaderstyle"
                                    GridLines="Vertical" AutoGenerateColumns="false" ShowFooter="True" BackColor="White"
                                    OnRowCommand="grwBrandInfo_RowCommand" OnRowEditing="grwBrandInfo_RowEditing"
                                    OnRowDeleting="grwBrandInfo_RowDeleting" OnRowUpdating="grwBrandInfo_RowUpdating"
                                    OnRowDataBound="grwBrandInfo_RowDataBound" OnRowCancelingEdit="grwBrandInfo_RowCancelingEdit"
                                    BorderStyle="None"&gt;
                                    &lt;Columns&gt;
                                        &lt;asp:TemplateField HeaderText="Quarts"&gt;
                                            &lt;ItemTemplate&gt;
                                                &lt;%#Eval("QUARTS")%&gt;
                                                &lt;asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='&lt;%#Eval("PERMIT_QUANTITY_ID") %&gt;' /&gt;
                                                &lt;asp:HiddenField ID="hdnQuarts" runat="server" /&gt;
                                            &lt;/ItemTemplate&gt;
                                            &lt;FooterTemplate&gt;
                                                &lt;asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='&lt;%#Eval("PERMIT_QUANTITY_ID") %&gt;' /&gt;
                                                &lt;asp:TextBox ID="txtFootQuarts" runat="server" CssClass="txtfields" MaxLength="4"&gt;&lt;/asp:TextBox&gt;
                                            &lt;/FooterTemplate&gt;
                                            &lt;EditItemTemplate&gt;
                                                &lt;asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='&lt;%#Eval("PERMIT_QUANTITY_ID") %&gt;' /&gt;
                                                &lt;asp:TextBox ID="txtEditQuarts" runat="server" EnableViewState="false" Text='&lt;%#Eval("QUARTS")%&gt;'
                                                    CssClass="txtfields" MaxLength="4"&gt;&lt;/asp:TextBox&gt;
                                            &lt;/EditItemTemplate&gt;
                                            &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                            &lt;ItemStyle HorizontalAlign="Center" /&gt;
                                            &lt;FooterStyle HorizontalAlign="Center" /&gt;
                                        &lt;/asp:TemplateField&gt;
                                        &lt;asp:TemplateField&gt;
                                            &lt;FooterTemplate&gt;
                                                &lt;asp:LinkButton ID="lbtnInsert" runat="server" Text="Insert" CssClass="hypfield"
                                                    CommandName="Insert" ValidationGroup="save"&gt;&lt;/asp:LinkButton&gt;
                                            &lt;/FooterTemplate&gt;
                                            &lt;FooterStyle HorizontalAlign="Center" /&gt;
                                            &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                        &lt;/asp:TemplateField&gt;
                                        &lt;asp:CommandField ShowEditButton="True" HeaderText="Action" ShowDeleteButton="true"
                                            ValidationGroup="save"&gt;
                                            &lt;ItemStyle CssClass="hypfield" HorizontalAlign="Center" VerticalAlign="Top" /&gt;
                                            &lt;ControlStyle CssClass="hypfield" /&gt;
                                            &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                        &lt;/asp:CommandField&gt;
                                    &lt;/Columns&gt;
                                    &lt;EmptyDataTemplate&gt;
                                        &lt;table border="1" cellpadding="5" cellspacing="0" width="100%"&gt;
                                            &lt;tr align="Left" bgcolor="#726E6D"&gt;
                                                &lt;td&gt;
                                                    &lt;b&gt;
                                                        &lt;asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='0' /&gt;
                                                        &lt;asp:Label ID="lblQuarts" runat="server" ForeColor="white" Text="Quarts" CssClass="lblfields"&gt;&lt;/asp:Label&gt;&lt;/b&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr align="left" id="trEntryNotCompleted" runat="server" bgcolor="#FFFFEE"&gt;
                                                &lt;td&gt;
                                                    &lt;asp:TextBox ID="txtQuarts" runat="server" CssClass="txtfields5char" MaxLength="4"&gt;&lt;/asp:TextBox&gt;
                                                &lt;/td&gt;
                                                                                           &lt;/tr&gt;
                                        &lt;/table&gt;
                                    &lt;/EmptyDataTemplate&gt;
                                    &lt;FooterStyle BackColor="#CCCC99" /&gt;
                                    &lt;RowStyle BackColor="#F7F7DE" /&gt;
                                    &lt;SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /&gt;
                                    &lt;PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /&gt;
                                    &lt;HeaderStyle BackColor="#6B696B" CssClass="gridheaderstyle" Font-Bold="True" ForeColor="White" /&gt;
                                    &lt;AlternatingRowStyle BackColor="White" /&gt;
                                &lt;/asp:GridView&gt; 

   &lt;asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="save" OnClick="btnSave_Click" /&gt;
</code></pre>

<p>So the problem is that how did i find the value of txtQuarts present in the empty template when i am saving data</p>
