摘要: 要防止同一用户同时登陆,首页应该记录在线用户的信息(这里与用户名为例),然后判断正在登陆的用户里面是否已存在。在这里使用一个cache存放已经登陆的用户名,但是还有一个问题就是要知道用户是什么时候离开系统的呢?这就要定期清除cache中的内容了,也就是设置一个cache的时间。这个时间可以跟用户的session值联系起来,刚好当用户session值失效的时候该用户在cache里面的信息也会被清空.... 阅读全文
posted @ 2009-05-14 14:24 X-Jonney 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 在一篇文章过长时,可以自动的写个小程序对其进行分页.具体代码:[代码] 阅读全文
posted @ 2009-05-14 14:22 X-Jonney 阅读(292) 评论(0) 推荐(0) 编辑
摘要: CREATE procedure main_table_pwqzc(@pagesize int,@pageindex int,@docount bit,@this_id)asif(@docount=1)beginselect count(id) from luntan where this_id=@this_idendelsebegindeclare @indextable table(id in... 阅读全文
posted @ 2009-05-14 14:20 X-Jonney 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 【已测试】DataList分页方法的核心原理是利用PagedDataSource对象 阅读全文
posted @ 2009-05-14 14:13 X-Jonney 阅读(470) 评论(0) 推荐(0) 编辑