本文整理汇总了VB.NET中System.Web.UI.WebControls.LinqDataSource类的典型用法代码示例。如果您正苦于以下问题:VB.NET LinqDataSource类的具体用法?VB.NET LinqDataSource怎么用?VB.NET LinqDataSource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LinqDataSource类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: citiesArray
Partial Class Default3
Inherits System.Web.UI.Page
Dim citiesArray() As String = _
{ _
"Atlanta", _
"Charlotte", _
"Denver", _
"New York", _
"San Francisco" _
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub LinqDataSource_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LinqDataSourceSelectEventArgs) Handles LinqDataSource1.Selecting
Dim cities = From city In citiesArray _
Where city > "B" _
Select city
e.Result = cities
' Or we could set e.Result = citiesArray to return all rows.
End Sub
End Class