12 2012 档案
摘要:Session清除掉,点击浏览器的后退键还会回到上个页面,需要在pageload里面加:Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);Response.Cache.SetNoStore();用来禁止缓存。还有段代码参考:Response.Buffer=true; Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1); Response.Expires=0; Response.CacheControl="no-cache"
阅读全文
摘要:1.简单形式:var q = from p in db.Products group p by p.CategoryID into g select g;语句描述:使用Group By按CategoryID划分产品。说明:from p in db.Products 表示从表中将产品对象取出来。group p by p.CategoryID into g表示对p按CategoryID字段归类。其结果命名为g,一旦重新命名,p的作用域就结束了,所以,最后select时,只能select g。当然,也不必重新命名可以这样写:var q = from p in db.Produ...
阅读全文
摘要:1、ArrarList 转换为 string[] : ArrayList list = new ArrayList(); list.Add("aaa"); list.Add("bbb"); //转换成数组 string[] arrString = (string[])list.ToArray(typeof( string)) ; 2、string[] 转换为 ArrarList : ArrayList list = new ArrayList(new string[] { "aaa", "bbb" }); 3、Ar
阅读全文
摘要:select itemCode,sum(generateMoney) as totalmoney from inf_balance where vehiclecode='VC12114257' group by ItemCode使用groupby
阅读全文
摘要:<SCRIPT LANGUAGE="JavaScript"> <!-- String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, ""); } String.prototype.RTrim = function() { return this.replace(/(\s*$)/g
阅读全文
摘要:一直没啥计划,这可不行。1.感觉asp.net要深入学习下,准备弄本asp.net4.0高级编程看看2.数据库方面基本查询会点,但不深入,要学习的有:函数、效率。。。。3.前端方面太多了,以前学的都已经开始忘了,要温故、深入4.生活上要积极向上,多运动,多去生活。。。。现在想到的就这么多,待续。。。。
阅读全文
摘要:1.onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue = false;"2.checked 判断true or false 用js 的 document.....3.IE6|IE7中li底部3px间距BUG#list li设置float:left4.vertical-align:bottom;5.a标签执行form的submit()事件 form1.submit();6.ajax定时获取数据7.asp.net 后台生成html标签 <ul id="
阅读全文
摘要:1。通过UserAgentprotected void Page_Load(object sender, EventArgs e) { //验证终端 string agent = Request.Headers["User-Agent"]; if (choose_net(agent)) { Response.Redirect("/mobile/"); } } //验证终端 public bool choose_net(String userAgent) { i...
阅读全文

浙公网安备 33010602011771号