Hi PRA,
I checked by checking for same text font as you posted with question also did one sample code which work fine and data get saved for typed font text. Please check the below test sample how it work for your refrence.
HTML
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
Name Doc:-
</td>
<td>
<asp:TextBox ID="txtNameDoc" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" Text="Save" runat="server" OnClick="Save" />
</td>
<td>
</td>
</tr>
</table>
<br />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" EmptyDataText="There are no records"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" />
<asp:BoundField DataField="NameDoc" HeaderText="Name Doc" />
</Columns>
</asp:GridView>
</div>HTML
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGrid();
}
}
protected void Save(object sender, EventArgs e)
{
string constr = ConfigurationManager.ConnectionStrings["constr2"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("INSERT INTO DocTable(NameDoc) VALUES(@NameDoc)", con))
{
cmd.Parameters.AddWithValue("@NameDoc", txtNameDoc.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
BindGrid();
}
}
public void BindGrid()
{
string constr = ConfigurationManager.ConnectionStrings["constr2"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("Select id, NameDoc from DocTable", con))
{
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
}
Screenshot