[*] Hello Snoopy

.NET and Flash Blog

2004年9月8日

取得页面执行时间的代码

摘要: 在Global.asax.cs文件中 protected void Application_BeginRequest(Object sender, EventArgs e){ Application["StartTime"] = System.DateTime.Now; }protected void Application_EndRequest(Object sender, EventAr... 阅读全文

posted @ 2004-09-08 09:13 HelloSnoopy 阅读(400) 评论(0) 推荐(0) 编辑
使用自定义用户控件的一些经验

摘要: 1、可以使用Page.LoadControl()方法来加载自定义用户控件。但是,请注意,这里的用户控件类实质上应该是两个类的“合成” CatalogList1 = (Article.Web.Controls.CatalogList)Page.LoadControl("Controls/CatalogList.ascx");因为页面是有xx.ascx 和xx.cs(xx.vb)两个组成 . 如果写... 阅读全文

posted @ 2004-09-08 09:11 HelloSnoopy 阅读(351) 评论(0) 推荐(0) 编辑
获取对象的所有属性或单个属性

摘要: 所有:Type.GetProperties()如System.Reflection.PropertyInfo[] ps = typeof(string).GetProperties();将返回一个PropertyInfo[] 类型单个:Type.GetProperty() 阅读全文

posted @ 2004-09-08 09:08 HelloSnoopy 阅读(498) 评论(0) 推荐(0) 编辑