11 2012 档案
asp.net C# 获得配置文件AppSettings 的值
摘要:using System.Configuration;//导入命名空间 //配置文件 Web.config <appSettings> <!--数据连接字符串--> <add key="SqlConnectionStr" value="server=.;uid=sa;pwd=sa;database=RCCMS"/> </appSettings> //在程序里获得配置文件的Key对应的值 System.Configuration.ConfigurationSettings.AppSettings[" 阅读全文
posted @ 2012-11-29 11:17 jameshappy 阅读(16594) 评论(1) 推荐(0)
Url传值编码UrlEncode和解码UrlDecode
摘要:url传汉字出现乱码解决办法对汉字进行编码和解码页面1Response.Redirect("Default2.aspx?para1="+HttpUtility.UrlEncode("中国你好数据")+"&para2=数据的方式的");页面2this.Label1.Text = Request["para2"].ToString(); //没有解码操作this.Label2.Text = System.Web.HttpUtility.UrlDecode(Request["para1"].T 阅读全文
posted @ 2012-11-21 17:17 jameshappy 阅读(629) 评论(0) 推荐(0)
将字符串转化为gb2312字符
摘要:string utfinfo = getpage; string gb2312info = string.Empty; Encoding utf8 = Encoding.UTF8; Encoding gb2312 = Encoding.GetEncoding("gb2312"); // Convert the string into a byte[]. byte[] unicodeBytes = utf8.GetBytes(utfinfo); ... 阅读全文
posted @ 2012-11-21 17:13 jameshappy 阅读(1205) 评论(0) 推荐(0)
设置自动增长列从哪里开始增长
摘要:ALTER TABLE dd AUTO_INCREMENT = 100000; 阅读全文
posted @ 2012-11-12 14:52 jameshappy 阅读(160) 评论(0) 推荐(0)