2012年3月25日

获取数据库的表中一个值

摘要: 把这个19 转成int类型 List<object> one = new List<object>(); one.Add(new XQsys.BLL.News().SelectNewslastID()); int id = Convert.ToInt32(one[0]);方法二: SqlConnection conn = sqlhelp.createcon(); SqlCommand com = new SqlCommand(); com.CommandType = CommandType.Text; com.CommandText = "select Use 阅读全文

posted @ 2012-03-25 00:38 譕? 阅读(183) 评论(0) 推荐(0) 编辑

DataTabe转JSON

摘要: 代码附上:public static string DataTableToJSON(DataTable dt, string dtName) { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); using (JsonWriter jw = new JsonTextWriter(sw)) { JsonSerializer ser = new JsonSerializer(); jw.WriteStartObject(); jw.WritePropertyName(dtName); jw 阅读全文

posted @ 2012-03-25 00:26 譕? 阅读(131) 评论(0) 推荐(0) 编辑

jquery获取链接地址的值

摘要: 代码附上:function request(paras) { var url = location.href; var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); var paraObj = {} for (i = 0; j = paraString[i]; i++) { paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf( 阅读全文

posted @ 2012-03-25 00:17 譕? 阅读(549) 评论(2) 推荐(0) 编辑

AuthenticationCode验证码的使用

摘要: 1:将该插件的引用到项目中2:在工具箱里拖控件 3:验证控件: string sess; sess = (string)HttpContext.Current.Session["AuthenticationCode"]; 如果在.axsh中使用这控件需要添加 1: using System.Web.SessionState; 2:在IHttpHandler后添加 IRequiresSessionState 阅读全文

posted @ 2012-03-25 00:07 譕? 阅读(338) 评论(0) 推荐(0) 编辑

导航