摘要:
建立3个web页面,MainWeb.aspx, LeftTree.aspx, RightMain.aspx. 其中,MainWeb是容器,里面放置了2个Iframe,分别用来存放TreeView的导航页(LeftTree.aspx) 和右边的内容页(RightMain.aspx)。MainWeb.aspx的前台代码:[代码]TreeView导航页面LeftTree.aspx的前台代码:注意设置节点... 阅读全文
摘要:
简单分页:1.设置GridView的AllowPaging="True", PageSize默认为10.2.触发GridView的PageIndexChanging事件。3.在后台的PageIndexChanging事件中,写入代码:[代码]行删除:在GridView中添加删除列:<asp:CommandField ShowDeleteButton="True" />触发GridVie... 阅读全文
摘要:
点击GridView的标题,实现相应字段的正向、逆向排序。1. 首先设置GridView的属性,触发GridView的事件。设置GridView的AllowSorting属性为True, 设置各列的SortExpression为相应的列标题。[代码]触发GridView的Sorting事件。2. 后台代码:页面载入:[代码]绑定数据:[代码]Sorting事件:[代码] 阅读全文