title: Asp.net GridView How to convert to decimal in footer row?
body: <p>I have a gridview and this has a textbox in footerrow.I want to insert database.But I getting error.How to convert decimal? My value is decimal in database.My error:</p>
  
  <blockquote>
    <p>An exception of type 'System.Data.SqlClient.SqlException' occurred in
    System.Web.dll but was not handled in user code</p>
    
    <p>Additional information: Error converting data type nvarchar to
    numeric.</p>
  </blockquote>
  
  <p>Cs.code:</p>
  
  <pre><code>SqlDataSource1.InsertParameters["MIKTAR"].DefaultValue = ((TextBox)grdSiparisHar.FooterRow.FindControl("txtMiktar")).Text;
  </code></pre>
  
  <p>aspx code:</p>
  
  <pre><code> &lt;asp:GridView ID="grdSiparisHar" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" AllowPaging="True"&gt;
                      &lt;Columns&gt;
     &lt;asp:TemplateField HeaderText="MIKTAR" SortExpression="MIKTAR"&gt;
                              &lt;EditItemTemplate&gt;
                                  &lt;asp:TextBox ID="TextBox3" runat="server" Text='&lt;%# Bind("MIKTAR") %&gt;'&gt;&lt;/asp:TextBox&gt;
                              &lt;/EditItemTemplate&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:Label ID="Label4" runat="server" Text='&lt;%# Bind("MIKTAR") %&gt;'&gt;&lt;/asp:Label&gt;
                              &lt;/ItemTemplate&gt;
                                &lt;FooterTemplate&gt;
                                  &lt;asp:TextBox ID="txtMiktar" runat="server"&gt;&lt;/asp:TextBox&gt;
                              &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  </code></pre>