小迪的Blog
学习ing...(注明:该Blog中的任何信息都非原创,只是作为个人的阅读笔记)

随笔分类 -  点滴收藏

上一页 1 2
分页控件(.ascx文件)
摘要:public string strURL="WebForm1.aspx"; public int recordNum=1000; public int perPageNum=20; public int pageIndex; public string tableWidth="100%"; ... 阅读全文
posted @ 2005-03-21 23:09 小迪 阅读(1217) 评论(0) 推荐(0)
获得焦点的时候选中全部的文本
摘要:比如有一个TextBox,要求我们在它获得焦点的时候选中全部的文本,我们就可以这样处理:TextBox1.Attributes["onFocus"]="javascript:this.select();"; 阅读全文
posted @ 2005-03-19 16:40 小迪 阅读(1513) 评论(2) 推荐(0)
解决DataGrid显示时间格式问题
摘要:通常DataGrid显示时间的格式是:2002-10-10 0:00:00 在DataGrid 属性生成器-〉列-〉数据格式设置表达式->填写{0:d} //显示格式2002-10-10 属性生成器-〉列-〉数据格式设置表达式->填写{0:d} {0:hh} {0:mm} {0:ss}//显示格式2002-10-10 0:00:00 阅读全文
posted @ 2005-03-19 11:26 小迪 阅读(1189) 评论(0) 推荐(0)
在Load中只初始化一次
摘要:if(!IsPostBack) { } 阅读全文
posted @ 2005-03-17 17:35 小迪 阅读(679) 评论(0) 推荐(0)
Session
摘要:设置Session Session["search"] = "xxx"; 释放Session Session["yourSession"]=null //方法一 Session.Remove("yourSession"); //方法二 Session.Abandon(); //方法三,取消整个对话 Session.Clear(); //方法四,取消整个对话 阅读全文
posted @ 2005-03-17 17:32 小迪 阅读(1324) 评论(2) 推荐(0)
乱码问题
摘要:在 webConfig中加入 阅读全文
posted @ 2005-03-17 17:30 小迪 阅读(328) 评论(0) 推荐(0)
按照选定时间保存cookie
摘要:前台: 不保存 保存一天 保存一月 保存一年 后台: public void AddLoginCookie(int day) { HttpCookie cookie = new HttpCookie("remrember"); cookie.Values.Add("userName",Session["userName"].ToSt... 阅读全文
posted @ 2005-03-17 17:24 小迪 阅读(954) 评论(0) 推荐(0)
动态生成button并关联其onclick事件
摘要:HtmlTableCell cellDel = new HtmlTableCell(); Button btnDel = new Button(); btnDel.Click += new EventHandler(this.btnDel_Click); cellDel.Controls.Add(btnDel); 阅读全文
posted @ 2005-03-17 09:43 小迪 阅读(1536) 评论(0) 推荐(0)
鼠标滚轮缩放图片(js)
摘要:function ZoomImg(o) { var zoom = parseInt(o.style.zoom, 10) || 100; zoom += event.wheelDelta / 12; if(zoom > 0) o.style.zoom = zoom... 阅读全文
posted @ 2005-03-17 09:41 小迪 阅读(2546) 评论(0) 推荐(0)
获取用户计算机信息
摘要:IP地址:Request.UserHostAddress 操作系统:HttpContext.Current.Request.UserAgent.Split(';')[2].Trim() 浏 览 器:HttpContext.Current.Request.UserAgent.Split(';')[1].Trim() 操作系统: case "Windows NT 5.0": strResult =... 阅读全文
posted @ 2005-03-17 09:32 小迪 阅读(906) 评论(0) 推荐(0)

上一页 1 2