摘要: 在SQL Server中, 我们有时需要在清空数据表之后,重新添加记录时,标识列重新从1开始计数。 我们只需要在插入记录之前,执行下面的命令: DBCC CHECKIDENT ('表名', RESEED, 0) ------------------------------------------------------------------------------------... 阅读全文
posted @ 2008-11-26 17:42 UouHt 阅读(5373) 评论(0) 推荐(0) 编辑
摘要: select top 1 * from News where NewsID>getid --下一条新闻 select top 1 * from News where NewsID<getid order by NewsID desc --上一条新闻 阅读全文
posted @ 2008-11-26 10:19 UouHt 阅读(434) 评论(2) 推荐(0) 编辑
摘要: 由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。立马报出“从客户端 中检测到有潜在危险的Request.Form值”这样的错。 解决方案一: 在.aspx文件头中加入这... 阅读全文
posted @ 2008-10-30 09:24 UouHt 阅读(61140) 评论(6) 推荐(9) 编辑
摘要: 前台 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 2 3 4 5 6 24 25 26 用户投票页面 27 28 29 30 31 32 33 ... 阅读全文
posted @ 2008-10-21 10:09 UouHt 阅读(268) 评论(0) 推荐(1) 编辑
摘要: 如何为gridview控件里的“删除”列添加一个确认对话框?网上众说纷纭,大致见到了三种解决方案,现归纳如下: 1、继承Web.IO里的button控件,为其实现一个IPostback的接口用于回调,具体代码之复杂,只有作者自己想体会吧…… 2、在gridview... 阅读全文
posted @ 2008-10-15 13:29 UouHt 阅读(381) 评论(0) 推荐(0) 编辑
摘要: nti.Ntid = int.Parse(gvNewsType.DataKeys[e.RowIndex].Values[0].ToString()); nti.Title = ((TextBox)gvNewsType.Rows[e.RowIndex].FindControl("tbTitle")).Text; nti.Allow = int.Parse(((RadioButtonList)g... 阅读全文
posted @ 2008-10-15 10:44 UouHt 阅读(309) 评论(0) 推荐(0) 编辑