2008年12月23日

C#中遍历TreeView的两个常用方法

摘要: 在TreeView查找某一节点,通常有两种方法,一种是递归的,一种不是递归,但都是深度优先算法。其中,非递归方法效率高些,而递归算法要简洁一些。 第一种,递归算法,代码如下: private TreeNode FindNode( TreeNode tnParent, string strValue ) { if( tnParent == null ) return null; ... 阅读全文

posted @ 2008-12-23 15:36 Shorty 阅读(242) 评论(0) 推荐(0)

后台获取绑定的值

摘要: int userID = StrUtils.ToInt32(DataBinder.Eval(e.Item.DataItem, "Creator"), 0); 阅读全文

posted @ 2008-12-23 15:35 Shorty 阅读(116) 评论(0) 推荐(0)

全局页面缓存

摘要: Duration以秒为单位 阅读全文

posted @ 2008-12-23 15:34 Shorty 阅读(109) 评论(0) 推荐(0)

JS刷新父页面

摘要: Response.Write(""); 刷新本页Response.Write(""); 刷新父页和本页面: Response.Write(""); 阅读全文

posted @ 2008-12-23 15:34 Shorty 阅读(358) 评论(0) 推荐(0)

RadioButtonList JS获取其中选定的项

摘要: var RadioObject = document.getElementById(""); var RadioInput = RadioObject.getElementsByTagName("INPUT"); var BeginDate = document.getElementById(""); var EndDate = document.getElementById(""); var... 阅读全文

posted @ 2008-12-23 15:32 Shorty 阅读(280) 评论(0) 推荐(0)

复杂EXCEL处理(DataSet里的值导入EXCEL)

摘要: 定义private Excel.ApplicationClass _excel; private void SaveToXls(string fileName,DataSet ds) { _excel = new Excel.ApplicationClass(); System.Data.DataTable table = ds.Tables[0]; Excel.Wo... 阅读全文

posted @ 2008-12-23 15:29 Shorty 阅读(227) 评论(0) 推荐(0)

导航

点击右上角即可分享
微信分享提示