Hii Amar,
Kindly refer below Sample.
HTML
<table>
<tr>
<th>Number:</th>
<td><asp:TextBox runat="server" ID="txtNUmber" /></td>
</tr>
<tr>
<th colspan="2"><asp:Button Text="Save" ID="btnSave" runat="server" OnClick="OnAdd" /></th>
</tr>
</table>
<asp:GridView runat="server" ID="gvNumber" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="ID" HeaderText="Number" />
</Columns>
</asp:GridView>
Namespace
using System.Data;
Code
protected void BindGrid()
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[1] { new DataColumn("Id", typeof(Int64)) });
dt.Rows.Add(Convert.ToInt64(txtNUmber.Text));
gvNumber.DataSource = dt;
gvNumber.DataBind();
}
protected void OnAdd(object sender, EventArgs e)
{
BindGrid();
}
Screenshot