using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Security; using System.Security.Permissions; using System.IO; using System.Text;
public partial class Adm_product_add_Home : System.Web.UI.Page { DBcommand DBAcquire = new DBcommand(); protected void Page_Load(object sender, EventArgs e) { Label prd_info = new Label(); if (!Page.IsPostBack) {
string type = Request.QueryString["type"].ToString(); if (type == "add") {
} else { DBAcquire.open_conn(); int id = DBAcquire.GetID("select catid from Home where Cat='" + Request.QueryString["catid"] + "'");
DBAcquire.new_comm("select Cat, description from Home where catid=" + id + ""); DBAcquire.DBReader(); if (DBAcquire.readDB.Read()) { home_Title.Text = DBAcquire.readDB.GetValue(0).ToString(); // Home_name.Text = DBAcquire.readDB.GetValue(1).ToString(); prd_info.Text = DBAcquire.readDB.GetValue(1).ToString(); }
DBAcquire.open_conn(); int id = DBAcquire.GetID("select Catid from Home where Cat='" + Request.QueryString["Catid"] + "'"); string qry; qry = string.Format("update Home set Cat ='" + home_Title.Text + "', description='" + Server.HtmlDecode(Home_name.Content.Replace("'", "''")) + "' where Catid=" + id + ""); DBAcquire.new_comm(qry); Response.Write(qry); DBAcquire.executecommand(); DBAcquire.comm.Cancel(); DBAcquire.close_conn(); }
Response.Redirect("default.aspx"); } }
my class code is here DBCommand.cs page code
using System; using System.Collections.Generic; using System.Web; using System.Data.Sql; using System.Configuration; using System.Data.SqlClient; using System.Collections; /// <summary> /// Summary description for DBcommand /// </summary> public class DBcommand { #region Global Variables SqlConnection conn; public SqlCommand comm, comm1; public SqlDataReader readDB, readDB1; #endregion public DBcommand() { // // TODO: Add constructor logic here // conn = new SqlConnection();
} public void open_conn() { if (conn.State == System.Data.ConnectionState.Closed) {
actually you are getting the text like ??????????????????????????????????????????????????????????????????? in SQL because you don't have that font installed on your computer
install font related to russian language it will show that properly
zubair258
Member
112 Points
129 Posts
how to insert Russia text into database and how to get Russia text in asp.net using c sharp
Dec 05, 2011 10:28 AM|LINK
back end codeon default.aspx.cs pagemy class code is here DBCommand.cs page codecheck this three file i can insert when i click on ADD button then go to the default.aspx page , i can send query string to this pagelike thisdatabase table code heregaikwad_anil...
Contributor
2805 Points
534 Posts
Re: how to insert Russia text into database and how to get Russia text in asp.net using c sharp
Dec 05, 2011 10:38 AM|LINK
actually you are getting the text like ??????????????????????????????????????????????????????????????????? in SQL because you don't have that font installed on your computer
install font related to russian language it will show that properly
www.thecodekey.com
Please mark as answer if useful