Insert HINDI Font in ASP.NET web page to SQL Database

In many sites we save HINDI data in a SQL data base. But is too difficult to insert a HINDI font into data base. I tried to solve this problem. Then this works exactly.


First create one table tbhindi in sql 2000

First create columns sno , username, fullname.

In the fullname column I store Hindi (UNICODE).


Then create a new WEBSITE.

In A Website

First you add a Google API for translating English to any language. On this location click on this link:

On this link you download folder. Then create in a website a bin folder and put GoogleTranslateAPI.dll & Newtonsoft.Json.dll
after adding a bin folder with .dll then you create your .aspx page.

In .aspx page

First add controls; a textbox, a Button, a Label and a Girdview.

After naming the control write code for the Button.

On a Button1_Click

protected void Button1_Click(object sender, EventArgs e)
        string Text = TextBox1.Text;
        Console.WriteLine("Before Translation:{0}", Text);
        Text = Google.API.Translate.Translator.Translate(Text, Google.API.Translate.Language.English,
        Label1.Text = Text;

        string constr1;
        IFormatProvider culture = new CultureInfo("fr-Fr", true);
        constr1 = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
        con = new SqlConnection(constr1);
        string sql = "insert into tbHindi(username,Fullname) values('" + TextBox1.Text + "',N'" + Label1.Text + "')";
        cmd = new SqlCommand(sql, con);
        int res;
        res = cmd.ExecuteNonQuery();
        res = 1;



I think that's the solution to help for you. 

Similar Articles