Request.QueryString汉字字符串丢失问题
我用Request.QueryString接受值时,本来传的是3个汉字,可是显示出来的只有2个了,请问改怎么解决这个问题???代码如下:(我是从GridView里传向Repeater的,表达式为"detail.aspx?name={0}")string name = Request.QueryString["name"].ToString();
Response.Write(name);
SqlConnection con = new SqlConnection("server=.;database=login;uid=sa;pwd=;");
SqlDataAdapter sdr = new SqlDataAdapter();
sdr.SelectCommand = new SqlCommand("select * from login where userName='" + name + "'", con);
DataSet ds = new DataSet();
sdr.Fill(ds, "user");
this.Repeater1.DataSource = ds.Tables["user"].DefaultView;