摘要: Ps:记一下用的时候,一不小心我手贱碰到的问题吧:我在页面里面加上了form runat=server,然后所有的html控件就再也找不着了。就是下面的control collection这里,如果加上form runat=server标签,页面里面所有的控件就会变为form控件的子集。这样产生了问... 阅读全文
posted @ 2015-05-22 16:35 calochCN 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1.母版页在标签中可以设置,注意标签是runat="server"的。2.子页在有个Title属性,默认值是Untitled Page,如果想用母板页的Title,可以将此属性去掉或值改为空。3.母版页和子页在后台代码Page_Load中都可以加上Page.Title = "..." 来设置标题。优... 阅读全文
posted @ 2015-05-22 10:14 calochCN 阅读(170) 评论(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 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 需要建立一个根文件夹 ~/xml/couter.txt#region网站访问量protectedvoidpageviews(){intcount=0;//数据累加intStat=0;StreamReadersrd;//取得文件的实际路径stringfile_path=Server.MapPath("... 阅读全文
posted @ 2015-05-22 09:05 calochCN 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 做了一个封装,使页面更容易维护一些。主要是两个方法,如下所示: privatevoidBindModule(ActionbindSingRpt){BindControls(this,"List_",bindSingRpt);}privatevoidBindControls(Pagepage... 阅读全文
posted @ 2015-05-21 16:39 calochCN 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 以前用flash做首页图片轮播。最近的网站里用到一个插件MyFocus插件焦点图插件用法如下: ">"thumb=""alt=""/> 使用起来很方便,使用上完全用ullist可以呈现,很方便。 阅读全文
posted @ 2015-05-21 16:21 calochCN 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Service UnavailableHTTP Error 503. The service is unavailable.今天要布署一个网站,在自己的电脑上,结果碰到服务器503错误,找应用程序池的原因:最终找到解决方案:修改应用程序池的高级设置,然后选标识,选择用户为LocalSystem,如下... 阅读全文
posted @ 2015-05-21 09:26 calochCN 阅读(1112) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.Common;using System.Reflection;using Syst... 阅读全文
posted @ 2015-05-20 21:38 calochCN 阅读(509) 评论(1) 推荐(2) 编辑
摘要: .net framework中使用扩展方法,由网摘上看到,是因为编译器将扩展方法带上了ExtensionAttribute特性要在.net framework 2.0中使用的话,可以自定义一个特性:namespaceSystem.Runtime.CompilerServices{publicclas... 阅读全文
posted @ 2015-05-20 17:51 calochCN 阅读(447) 评论(0) 推荐(0) 编辑