本文整理汇总了VB.NET中System.Web.UI.WebControls.ObjectDataSource.StartRowIndexParameterName属性的典型用法代码示例。如果您正苦于以下问题:VB.NET ObjectDataSource.StartRowIndexParameterName属性的具体用法?VB.NET ObjectDataSource.StartRowIndexParameterName怎么用?VB.NET ObjectDataSource.StartRowIndexParameterName使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Web.UI.WebControls.ObjectDataSource
的用法示例。
在下文中一共展示了ObjectDataSource.StartRowIndexParameterName属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1:
Protected Sub rowsToDisplay_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rowsToDisplay.SelectedIndexChanged
GridView1.PageSize = Integer.Parse(rowsToDisplay.SelectedValue)
End Sub
开发者ID:VB.NET开发者,项目名称:System.Web.UI.WebControls,代码行数:3,代码来源:ObjectDataSource.StartRowIndexParameterName
示例2: GetSubsetOfEmployees
Public Class CustomerLogic
Public Function GetSubsetOfEmployees(ByVal startRows As Integer, ByVal maxRows As Integer) As List(Of Customer)
Dim ndc As New NorthwindDataContext()
Dim customerQuery = _
From c In ndc.Customers _
Select c
Return customerQuery.Skip(startRows).Take(maxRows).ToList()
End Function
Public Function GetEmployeeCount() As Integer
Dim cachedCount = HttpRuntime.Cache("TotalEmployeeCount")
If cachedCount IsNot Nothing Then
Return Integer.Parse(cachedCount.ToString())
Else
Dim ndc As New NorthwindDataContext()
Dim totalNumberQuery = _
From c In ndc.Customers _
Select c
Dim employeeCount = totalNumberQuery.Count()
HttpRuntime.Cache.Add("TotalEmployeeCount", employeeCount, Nothing, DateTime.Now.AddMinutes(5), Cache.NoSlidingExpiration, CacheItemPriority.Normal, Nothing)
Return employeeCount
End If
End Function
End Class
开发者ID:VB.NET开发者,项目名称:System.Web.UI.WebControls,代码行数:28,代码来源:ObjectDataSource.StartRowIndexParameterName