摘要: if(Session["admin"]!=null){Session.Remove("admin");Session.RemoveAll();Response.Cookies["admin"].Expires=DateTime.Now;//从当前时间开始过期Response.Redirect("login.html");} 阅读全文
posted @ 2009-12-08 17:07 铞迩锒铛 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 1.在web.config中<system.web>节点下添加一句配置:<globalizationrequestEncoding="gb2312"responseEncoding="gb2312"fileEncoding="gb2312"culture="zh-CN"/>节点属性解释:requestEncoding:指定每一传入请求的假定的编码,包括已传递的数据和查询字符... 阅读全文
posted @ 2009-12-08 17:06 铞迩锒铛 阅读(2745) 评论(0) 推荐(0) 编辑
摘要: function __doOpenView(aim,_width,_height,_top,_left){ if(_width==0 || _width=="") _width=350; if(_height==0 || _height=="") _height=300; if(_top=="") _top=10; if(_left=="") _left=10; var m = open(aim,... 阅读全文
posted @ 2009-12-05 23:19 铞迩锒铛 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 在数据库的设计的时候必须要有一个字段是来存储操作时间的同时还有一个字段来存储流水线的编号。private string GetSerialNo() {DataTable dt = db.GetDataTable(db.ConnStr, "select isnull(max(fld_46_2)+1,1) from gmis_mo_46 where DateDiff(day,fld_46_3,'" ... 阅读全文
posted @ 2009-12-05 23:18 铞迩锒铛 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 查看过去的某年中共有多少个星期,如果是当前年份则查询当前是第几星期的两中方法:1>. DatePartdeclare @Year VarChar(4)Set @Year='2008'Select @Year,Case When DatePart(Year,GetDate())<>@Year Then DatePart(Week,Cast((@Year+' 12 31 ') As ... 阅读全文
posted @ 2009-12-05 23:15 铞迩锒铛 阅读(319) 评论(0) 推荐(0) 编辑
摘要: [代码]在调用的时候只需要将要处理的含有html标签的字符串传进来就可如:string strhtml="<img src=\"images/ad.gif\" border=\"0\"><p>你好,中国!<p>"string str=striphtml(strhtml);Response.Write(str);---------------------输出的结果... 阅读全文
posted @ 2009-11-14 13:18 铞迩锒铛 阅读(987) 评论(0) 推荐(0) 编辑
摘要: public class StringUtility { private static string ByteArrayToStr(byte[] by) { try { return Encoding.GetEncoding("gb2312").GetString(by); } catch { return ""; } } public static string Base64ToString(s... 阅读全文
posted @ 2009-10-31 12:23 铞迩锒铛 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 后台代码:using System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.W... 阅读全文
posted @ 2008-11-08 17:26 铞迩锒铛 阅读(1440) 评论(3) 推荐(0) 编辑
摘要: 一个人在这个城市生活了两年了,好像对周围的环境已经麻木了。 每天就是这样一个人的过着,有的时候真的好像回家,出来了才能明白家就是温馨的避风港 阅读全文
posted @ 2008-11-07 19:38 铞迩锒铛 阅读(107) 评论(0) 推荐(0) 编辑