摘要: //////绑定新闻列表,带分页与查询////////////protectedvoidBindList(Repeatera,AspNetPagerAspNetPager1,Expression>filter){ClassNo=Request["ClassNo"];varnew_list=newLi... 阅读全文
posted @ 2015-05-27 10:53 calochCN 阅读(244) 评论(0) 推荐(0)
摘要: 对于.net webform与 .net mvc,我是小有所成之后才又回到了webform,先前的时候只是在webform学习挺深入了,英文也练地久了,发现编程只是在英文的好坏是非常大的一个影响。webform,近来做这个,真正感受到了那种快速,这种效率来自哪里呢?它们需要一个懂它们的人来封装!而w... 阅读全文
posted @ 2015-05-25 22:49 calochCN 阅读(199) 评论(0) 推荐(0)
摘要: /// /// 过滤不安全的字符串 /// /// /// public static string FilteSQLStr(string Str) { Str = Str.Replace("'", ""); Str = Str.Replace("\"", ""); Str = Str.Re... 阅读全文
posted @ 2015-05-25 20:48 calochCN 阅读(733) 评论(0) 推荐(0)
摘要: usingSystem.Text.RegularExpressions;usingSystem.Web; internalclassHtmlHelper{/// ///去除HTML标记 /// ///包括HTML的源码 ///已经去除后的文字 publicstaticstringNoHTML(str... 阅读全文
posted @ 2015-05-25 19:55 calochCN 阅读(613) 评论(0) 推荐(0)
摘要: 这是最近在干一个webform的cms的时候用起来的,原来虽然做过很多技术,什么remoting,wcf,webservice,可是弄来弄去,最后也没个收藏的地儿,全都放在笔记本儿上了,可是人又懒地可以,做来做去,最后它们还是扔在那里。说正题吧:最近用到的这套小型的cms,主就是用的链表了,大部分的... 阅读全文
posted @ 2015-05-25 19:54 calochCN 阅读(276) 评论(1) 推荐(0)
摘要: Ps:记一下用的时候,一不小心我手贱碰到的问题吧:我在页面里面加上了form runat=server,然后所有的html控件就再也找不着了。就是下面的control collection这里,如果加上form runat=server标签,页面里面所有的控件就会变为form控件的子集。这样产生了问... 阅读全文
posted @ 2015-05-22 16:35 calochCN 阅读(251) 评论(0) 推荐(0)
摘要: 1.母版页在标签中可以设置,注意标签是runat="server"的。2.子页在有个Title属性,默认值是Untitled Page,如果想用母板页的Title,可以将此属性去掉或值改为空。3.母版页和子页在后台代码Page_Load中都可以加上Page.Title = "..." 来设置标题。优... 阅读全文
posted @ 2015-05-22 10:14 calochCN 阅读(173) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-05-22 09:34 calochCN 阅读(3) 评论(0) 推荐(0)
摘要: 这个是页面里的代码需要在上面引入: 后台用法:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;... 阅读全文
posted @ 2015-05-22 09:29 calochCN 阅读(378) 评论(0) 推荐(0)
摘要: 需要建立一个根文件夹 ~/xml/couter.txt#region网站访问量protectedvoidpageviews(){intcount=0;//数据累加intStat=0;StreamReadersrd;//取得文件的实际路径stringfile_path=Server.MapPath("... 阅读全文
posted @ 2015-05-22 09:05 calochCN 阅读(197) 评论(0) 推荐(0)