int code=3077;
SqlConnection cn = new SqlConnection();
cn.ConnectionString = "Server=GUTTULA\\SQLEXPRESS;database=unicode;uid=sa;pwd=guttla;Integrated Security=True";
SqlCommand cmd = new SqlCommand("select Englishchar from eng_conversion where unicode='3077'", cn);
cn.Open();
SqlParameter param = new SqlParameter();
Label1.Text =Label1.Text + "&#" + code.ToString() + ";";
cmd.Parameters.Add("@Englishchar", SqlDbType.NVarChar).Value = Label2.Text;
cmd.ExecuteNonQuery();
}
in the database table eng_conversion, i took 2 columns-unicode and corresponding Englishchar.But i am not able to retrieve the englishchar corresponding to the unicode.
Please help....
.NET 2.0
$weety
Mark this post as "ANSWER", if it helped you..
anoo_sweety
Member
375 Points
93 Posts
Telugu to english transliteration...........
Feb 20, 2009 08:48 AM|LINK
hi guys,when i click the telugu button iam getting the codenumber instead of telugu text and here is my code........
html:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<table style="width: 496px; height: 192px">
<tr>
<td align="center" colspan="3" style="font-weight: bold; height: 46px">
TELUGU TO ENGLISH TRANSLITERATION</td>
</tr>
<tr>
<td style="width: 91px; height: 170px">
<table style="width: 144px; height: 200px">
<tr>
<td rowspan="1" style="width: 648px; height: 563px;">
<table style="width: 205px; height: 256px; color: black; background-color: lightsteelblue;">
<tr>
<td align="center" style="width: 8px; height: 26px">
<asp:Button ID="Button1" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="btn1Resource1" OnClick="Button1_Click" Text="అ" Width="28px" /></td>
<td align="center" style="width: 10px; height: 26px">
<asp:Button ID="Button2" runat="server" Font-Bold="True" Font-Size="Medium" Height="27px"
meta:resourcekey="btn2Resource1" OnClick="Button2_Click" Text="ఆ" Width="30px" /></td>
<td align="center" style="width: 26px; height: 26px">
<asp:Button ID="Button3" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="btn3Resource1" Text="ఇ " Width="30px" /></td>
<td align="center" style="width: 8px; height: 26px">
<asp:Button ID="Button4" runat="server" Font-Bold="True" Font-Size="Medium" Height="27px"
meta:resourcekey="btn4Resource1" Text="ఈ " Width="30px" /></td>
<td align="center" style="width: 8px; height: 26px">
<asp:Button ID="Button5" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="btn5Resource1" Text="ఉ" Width="28px" /></td>
<td align="center" style="width: 21px; height: 26px">
<asp:Button ID="Button6" runat="server" Font-Bold="True" Font-Size="Medium" Height="26px"
meta:resourcekey="btn6Resource1" Text="ఊ " Width="26px" /></td>
<td align="center" style="width: 7px; height: 26px">
<asp:Button ID="Button7" runat="server" Font-Bold="True" Font-Size="Medium" Height="27px"
meta:resourcekey="btn7Resource1" Text="ఋ" Width="28px" /></td>
<td align="center" style="width: 5px; height: 26px">
<asp:Button ID="Button8" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button8Resource1" Text="ౠ " Width="34px" /></td>
</tr>
<tr>
<td align="center" style="width: 8px; height: 30px">
<asp:Button ID="Button9" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button9Resource1" Text="ఎ" Width="28px" /></td>
<td align="center" style="width: 10px; height: 30px">
<asp:Button ID="Button10" runat="server" Font-Bold="True" Font-Size="Medium" Height="27px"
meta:resourcekey="Button10Resource1" Text="ఏ " Width="28px" /></td>
<td align="center" style="width: 26px; height: 30px">
<asp:Button ID="Button11" runat="server" Font-Bold="True" Font-Size="Medium" Height="26px"
meta:resourcekey="Button11Resource1" Text="ఐ " Width="26px" /></td>
<td align="center" style="width: 8px; height: 30px">
<asp:Button ID="Button12" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button12Resource1" Text="ఒ " Width="28px" /></td>
<td align="center" style="width: 8px; height: 30px">
<asp:Button ID="Button13" runat="server" Font-Bold="True" Font-Size="Medium" Height="29px"
meta:resourcekey="Button13Resource1" Text="ఓ " Width="26px" /></td>
<td align="center" style="width: 21px; height: 30px">
<asp:Button ID="Button14" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button14Resource1"
Text="ఔ" Width="27px" /></td>
<td align="center" style="width: 7px; height: 30px">
<asp:Button ID="btn15" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="b1Resource1"
Text="అం" Width="27px" /></td>
<td align="center" style="width: 5px; height: 30px">
<asp:Button ID="btn16" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button1Resource1"
Text="అః" Width="31px" /></td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
</td>
<td style="width: 26px">
</td>
<td style="width: 8px">
</td>
<td style="width: 8px">
<br />
</td>
<td style="width: 21px">
</td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button100" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ా" Width="28px" /></td>
<td style="width: 26px">
<asp:Button ID="Button101" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ి" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button102" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ీ" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button103" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ు" Width="28px" /></td>
<td style="width: 21px">
<asp:Button ID="Button104" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ూ" Width="28px" /></td>
<td style="width: 7px">
<asp:Button ID="Button105" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ృ" Width="28px" /></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button106" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ౄ" Width="28px" /></td>
<td style="width: 26px">
<asp:Button ID="Button107" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ె" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button108" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ే" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button109" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ై" Width="28px" /></td>
<td style="width: 21px">
<asp:Button ID="Button110" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ొ" Width="28px" /></td>
<td style="width: 7px">
<asp:Button ID="Button111" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ో" Width="28px" /></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
</td>
<td style="width: 26px">
<asp:Button ID="Button112" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="ౌ" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button113" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="అం" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button114" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="అః" Width="28px" /></td>
<td style="width: 21px">
<asp:Button ID="Button115" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
Text="్" Width="28px" /></td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
</td>
<td style="width: 26px">
</td>
<td style="width: 8px">
</td>
<td style="width: 8px">
</td>
<td style="width: 21px">
<br />
</td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button51" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button2Resource1" Text="క" Width="28px" /></td>
<td style="width: 26px">
<asp:Button ID="Button52" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button3Resource1"
Text="ఖ" Width="27px" /></td>
<td style="width: 8px">
<asp:Button ID="Button53" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button4Resource1"
Text="గ " Width="27px" /></td>
<td style="width: 8px">
<asp:Button ID="Button54" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button5Resource1" Text="ఘ " Width="27px" /></td>
<td style="width: 21px">
<asp:Button ID="Button55" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button6Resource1"
Text="ఙ" Width="27px" /></td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button56" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button7Resource1" Text="చ " Width="28px" /></td>
<td style="width: 26px">
<asp:Button ID="Button57" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button15Resource1"
Text="ఛ" Width="29px" /></td>
<td style="width: 8px">
<asp:Button ID="Button58" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button16Resource1"
Text="జ" Width="29px" /></td>
<td style="width: 8px">
<asp:Button ID="Button59" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button17Resource1" Text="ఝ " Width="27px" /></td>
<td style="width: 21px">
<asp:Button ID="Button60" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button18Resource1" Text="ఞ" Width="27px" /></td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px; height: 26px">
</td>
<td style="width: 10px; height: 26px">
<asp:Button ID="Button61" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button19Resource1" Text="ట" Width="28px" /></td>
<td style="width: 26px; height: 26px">
<asp:Button ID="Button62" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button20Resource1"
Text="ఠ" Width="29px" /></td>
<td style="width: 8px; height: 26px">
<asp:Button ID="Button63" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button21Resource1"
Text="డ" Width="27px" /></td>
<td style="width: 8px; height: 26px">
<asp:Button ID="Button64" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button22Resource1" Text="ఢ" Width="27px" /></td>
<td style="width: 21px; height: 26px">
<asp:Button ID="Button65" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button23Resource1" Text="ణ" Width="27px" /></td>
<td style="width: 7px; height: 26px">
</td>
<td style="width: 5px; height: 26px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button66" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button24Resource1" Text="త " Width="30px" /></td>
<td style="width: 26px">
<asp:Button ID="Button67" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button25Resource1" Text="థ" Width="28px" /></td>
<td style="width: 8px">
<asp:Button ID="Button68" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button26Resource1"
Text="ద" Width="30px" /></td>
<td style="width: 8px">
<asp:Button ID="Button69" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button27Resource1" Text="ధ " Width="27px" /></td>
<td style="width: 21px">
<asp:Button ID="Button70" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button28Resource1" Text="న" Width="27px" /></td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td style="width: 10px">
<asp:Button ID="Button71" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button29Resource1"
Text="ప" Width="30px" /></td>
<td style="width: 26px">
<asp:Button ID="Button72" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button30Resource1" Text="ఫ" Width="30px" /></td>
<td style="width: 8px">
<asp:Button ID="Button73" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button31Resource1" Text="బ" Width="30px" /></td>
<td style="width: 8px">
<asp:Button ID="Button74" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button32Resource1" Text="భ " Width="30px" /></td>
<td style="width: 21px">
<asp:Button ID="Button75" runat="server" Font-Bold="True" Font-Size="Medium" Height="28px"
meta:resourcekey="Button33Resource1" Text="మ " Width="27px" /></td>
<td style="width: 7px">
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 10px; height: 17px">
<asp:Button ID="Button76" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button34Resource1"
Text="య " Width="27px" /></td>
<td style="width: 26px; height: 17px">
<asp:Button ID="Button77" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button35Resource1"
Text="ర" Width="27px" /></td>
<td style="width: 8px; height: 17px">
<asp:Button ID="Button78" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button43Resource1"
Text="ఱ" Width="27px" /></td>
<td style="width: 8px; height: 17px">
<asp:Button ID="Button79" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button36Resource1"
Text="ల" Width="27px" /></td>
<td style="width: 21px; height: 17px">
<asp:Button ID="Button80" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button37Resource1"
Text="ళ" Width="27px" /></td>
<td style="width: 7px; height: 17px">
</td>
<td style="width: 5px; height: 17px">
</td>
</tr>
<tr>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 10px; height: 17px">
<asp:Button ID="Button81" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button38Resource1"
Text="వ" Width="27px" /></td>
<td style="width: 26px; height: 17px">
<asp:Button ID="Button82" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button39Resource1"
Text="శ" Width="27px" /></td>
<td style="width: 8px; height: 17px">
<asp:Button ID="Button83" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button40Resource1"
Text="ష" Width="27px" /></td>
<td style="width: 8px; height: 17px">
<asp:Button ID="Button84" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button41Resource1"
Text="స" Width="27px" /></td>
<td style="width: 21px; height: 17px">
<asp:Button ID="Button85" runat="server" Font-Bold="True" Font-Size="Medium" meta:resourcekey="Button42Resource1"
Text="హ" Width="27px" /></td>
<td style="width: 7px; height: 17px">
</td>
<td style="width: 5px; height: 17px">
</td>
</tr>
<tr>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 10px; height: 17px">
</td>
<td style="width: 26px; height: 17px">
</td>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 21px; height: 17px">
</td>
<td style="width: 7px; height: 17px">
</td>
<td style="width: 5px; height: 17px">
</td>
</tr>
<tr>
<td style="width: 8px; height: 17px">
</td>
<td style="width: 10px; height: 17px">
</td>
<td style="width: 26px; height: 17px">
</td>
<td style="height: 17px" colspan="2">
<asp:Button ID="buttonShift" runat="server" Font-Bold="False" Font-Size="Smaller" Text="Shift" Width="62px" /></td>
<td style="width: 21px; height: 17px">
</td>
<td style="width: 7px; height: 17px">
</td>
<td style="width: 5px; height: 17px">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="width: 100px; height: 170px">
</td>
<td style="width: 100px; height: 170px">
<table>
<tr>
<td style="width: 100px">
Telugu Text:<br />
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:TextBox ID="txtTel" runat="server" Height="125px" Width="300px" OnTextChanged="txtTel_TextChanged"></asp:TextBox>
<asp:Label ID="Label1" runat="server"></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
<br />
</td>
</tr>
<tr>
<td align="center" style="width: 100px">
<asp:Button ID="ButtonClear" runat="server" Text="Clear" Width="91px" />
<asp:Button ID="buttonToEnglish" runat="server" Text="To English" /></td>
</tr>
<tr>
<td style="width: 100px">
<br />
</td>
</tr>
<tr>
<td style="width: 100px">
English Transliteration</td>
</tr>
<tr>
<td style="width: 100px">
<asp:TextBox ID="txtEng" runat="server" Height="125px" Width="300px"></asp:TextBox></td>
</tr>
</table>
<asp:Label ID="Label2" runat="server"></asp:Label></td>
</tr>
</table>
</form>
</body>
</html>
asp.net code:
protected void Button1_Click(object sender, EventArgs e)
{
int code=3077;
SqlConnection cn = new SqlConnection();
cn.ConnectionString = "Server=GUTTULA\\SQLEXPRESS;database=unicode;uid=sa;pwd=guttla;Integrated Security=True";
SqlCommand cmd = new SqlCommand("select Englishchar from eng_conversion where unicode='3077'", cn);
cn.Open();
SqlParameter param = new SqlParameter();
Label1.Text =Label1.Text + "&#" + code.ToString() + ";";
cmd.Parameters.Add("@Englishchar", SqlDbType.NVarChar).Value = Label2.Text;
cmd.ExecuteNonQuery();
}
in the database table eng_conversion, i took 2 columns-unicode and corresponding Englishchar.But i am not able to retrieve the englishchar corresponding to the unicode.
Please help....
.NET 2.0
Mark this post as "ANSWER", if it helped you..