webconfig
<globalization Requestencoding="gb2312" responseendcoding="gb2312" fileencoding="gb2312"/>

解决方案 »

  1.   

    在数据库中,把要插入中文的字段类型改成nchar或nvarchar,然后插入数据时在sql语句的数据前面加N.for example:
    Insert into tablename(columnName1)
    values(N'itemName')
      

  2.   

    数据库不支持utf-8字符。要用gb2132
      

  3.   

    to: tianshaguxing7358
       我按你的办法做了,不行。
    to: likj
       在数据库中怎么改?
      

  4.   

    改程序,不能改数据库。
    按照 zhanqiangz(闲云野鹤) 说的方法,把web.config里的utf-8全都改成gb2312
      

  5.   

    是下面这段代码的问题:
    private  string GetSql(string Name) 

    try 

    Assembly Asm = Assembly.GetExecutingAssembly(); 
    Stream strm = Asm.GetManifestResourceStream(Asm.GetName().Name + "."+Name); 
    StreamReader reader = new StreamReader(strm); 
    return reader.ReadToEnd(); 

    catch (Exception ex) 

    Console.Write("In GetSql:"+ex.Message); 
    throw ex; 

    }