摘要:
灵活的运用数据绑定操作 绑定到简单属性:<%#UserName%> 绑定到集合:<asp:ListBox id="ListBox1" datasource='<%# myArray%>' runat="server"> 绑定到表达式:<%#(class1.property1.ToString() + "," + class1.property2.ToString())%> 绑定到方法返回值:<%# GetSafestring(str) %> 绑定到Hashta 阅读全文
posted @ 2009-12-18 18:31
kntao
阅读(117)
评论(0)
推荐(0)
摘要:
用gridview做数据绑定时,是简单,容易操作,但是感觉数据量大时,就很慢了。gridview,增添删改,list数据源排序,分页等操作的代码:1.如果绑定的数据源为空时,仍然显示表头,核心代码: protected void BindData() { if (DtDataSource.Rows.Count == 0) { DtDataSource.Rows.Add(DtDataSource.NewRow()); this.GridView1.DataSource = DtDataSource; this.GridView1.DataBind(); int columnCount = thi 阅读全文
posted @ 2009-12-18 18:11
kntao
阅读(195)
评论(0)
推荐(0)
浙公网安备 33010602011771号