oceariadloded
New Member
I have created a stored procedure as follows \[code\]CREATE PROCEDURE spIns_nav_Content @CategoryID nVarChar(50), @ContentText nVarChar(Max) AS INSERT INTO dbo.nav_Content(CategoryID, ContentText, Active) VALUES (@CategoryID, @ContentText, 1) GO\[/code\]In my asp.net application I have a textbox and a button. My aspx page looks like: \[code\]<div> <asp:Label ID="Label1" runat="server" Text="Text here"></asp:Label> <asp:TextBox ID="txtContent" runat="server" Font-Names="ML-TTKarthika"></asp:TextBox> <asp:Button ID="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click" /> <asp:Label ID="lblContent" runat="server" Font-Names="ML-TTKarthika"></asp:Label></div>\[/code\]When clicked on btnUpload I need to save the non-english(malayalam) text in txtContent to database as unicode characters. The click event is as follows: \[code\] protected void btnUpload_Click(object sender, EventArgs e) { string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["TestMalayalamConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(connectionString); con.Open(); SqlCommand sqlCmd = con.CreateCommand(); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandText = "spIns_nav_Content"; sqlCmd.Parameters.Add("@CategoryID", SqlDbType.NVarChar, 50).Value = "http://stackoverflow.com/questions/14054543/Rashriyam"; sqlCmd.Parameters.Add("@ContentText", SqlDbType.NVarChar, -1).Value = http://stackoverflow.com/questions/14054543/txtContent.Text; sqlCmd.ExecuteScalar(); con.Close(); lblContent.Text = txtContent.Text; }\[/code\]When I see my db table the value in 'ContentText' is in English. How can i change this?