《ASP.Net快速入门》学习笔记2[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

数据绑定语法

1.   ASP.NET 声明性数据绑定语法使用 <%# %> 表示法。

2.   可以绑定到数据源、页或其他控件的属性、集合、表达式以及从方法调用返回的结果。

3.   语法示例

简单属性

Customer: <%# custID %>

集合

Orders: <asp:ListBox id="List1" datasource='<%# myArray %>' runat="server">

表达式

Contact: <%# ( customer.First Name + " " + customer.LastName ) %>

方法结果

Outstanding Balance: <%# GetBalance(custID) %>

本文关键:《ASP.Net快速入门》学习笔记2
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top