摘要: protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e){ if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { ... 阅读全文
posted @ 2012-06-05 18:20 Setme 阅读(165) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 过滤html标签 /// </summary> /// <param name="Htmlstring"></param> /// <returns></returns> public static string NoHTML(string Htmlstring) ... 阅读全文
posted @ 2012-06-05 18:19 Setme 阅读(223) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 添加关键字以及描述 /// </summary> /// <param name="key">关键字</param> /// <param name="des">描述</param> /// <param name="page">Page</param> pub... 阅读全文
posted @ 2012-06-05 18:12 Setme 阅读(203) 评论(0) 推荐(0) 编辑
摘要: aspx: <webdiyer:AspNetPager ID="AspNetPager" CssClass="paginator" CurrentPageButtonClass="cpb" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageSize="21" PrevPageT 阅读全文
posted @ 2012-06-05 18:09 Setme 阅读(279) 评论(0) 推荐(0) 编辑
摘要: aspx: <%if (YesIsNoPage){%> <webdiyer:AspNetPager ID="AspNetPager" CssClass="paginator" CurrentPageButtonClass="cpb" runat="server" AlwaysShow="True" FirstPageText="Home" LastPageText="End" ... 阅读全文
posted @ 2012-06-05 18:04 Setme 阅读(871) 评论(2) 推荐(0) 编辑
摘要: 验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息: System.Web.HttpException: 验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGe 阅读全文
posted @ 2012-06-05 18:00 Setme 阅读(25468) 评论(1) 推荐(1) 编辑
摘要: string path = Request.ServerVariables["SCRIPT_NAME"]; //获取URL地址string[] arr_path = path.Split("/".ToCharArray());Response.Write(arr_path[arr_path.Length - 1]); 阅读全文
posted @ 2012-06-05 17:40 Setme 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 内连接也叫连接,是最早的一种连接,最早被称为普通连接或自然连接。内连接是从结果中删除其他被连接表中没有匹配行的所有行,所以内连接可能会丢失信息。内连接的语法:SELECT fieldlist FROM table1 [INNER] join table2 ON table1.column=table2.column一个表中的行和与另外一个表中的行匹配连接。表中的数据决定了如何对这些行进行组合。从每一个表中选取一行,根据这些列的值是否相同,组合方式分为一对一、多对一和多对多的关系。1.一对一关系当连接的两个表,两个连接列的值完全相同,则两个表连接相当于一对一的关系。下面在“pubs”数据库中“t 阅读全文
posted @ 2012-06-05 14:07 Setme 阅读(2980) 评论(0) 推荐(0) 编辑
摘要: 外连接外连接则扩充了内连接的功能,会把内连接中删除表源中的一些保留下来,由于保留下来的行不同,把外连接分为左外连接、右外连接和全外连接这3种连接。1.左外连接左外连接保留了第一个表的所有行,但只包含第二个表与第一表匹配的行。第二个表相应的空行被放入NULL值。左外连接的语法:use studentSELECT fieldlist FROM table1 left join table2 ON table1.column=table2.column下面把“student”表和“grade”表左外连接,第一个表“student”有不满足连接条件的行。在查询分析器中输入的SQL语句如下:use st 阅读全文
posted @ 2012-06-05 13:55 Setme 阅读(389) 评论(0) 推荐(0) 编辑
摘要: select top 5 * FROM News where NewsTypeID=3 and (NewsIsRecommend=true and NewsIsInvisible=false) order by NewsTime desc换成select * FROM (select top 5 * from News where NewsTypeID=3 and (NewsIsRecommend=true and NewsIsInvisible=false)) order by NewsTime desc 阅读全文
posted @ 2012-06-05 13:48 Setme 阅读(2987) 评论(0) 推荐(0) 编辑