当前位置:编程学习 > C#/ASP.NET >>

asp.net连接mysql数据库 使用latin


在不更改数据库的前提下
本人使用以下方法  
1.配置连接字符串 加入charset=utf8
2.页面配置 codepage=65001
3.在tetle上加入一行
<meta http-equiv="Content-Type" content="textml; charset=utf-8" />
4.在查询 和添加语句加上 set names 'utf8';
5.在web.config 加入 <globalization requestEncoding="utf8" responseEncoding="utf8"/
>
--------------------编程问答--------------------
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,