本文整理汇总了VB.NET中System.Web.UI.WebControls.ObjectDataSource.DataObjectTypeName属性的典型用法代码示例。如果您正苦于以下问题:VB.NET ObjectDataSource.DataObjectTypeName属性的具体用法?VB.NET ObjectDataSource.DataObjectTypeName怎么用?VB.NET ObjectDataSource.DataObjectTypeName使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Web.UI.WebControls.ObjectDataSource
的用法示例。
在下文中一共展示了ObjectDataSource.DataObjectTypeName属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: New
' 导入命名空间
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Namespace Samples.AspNet.VB
Public Class AggregateData
Public Sub New()
End Sub
Shared table As DataTable
Private Function CreateData() As DataTable
table = New DataTable()
table.Columns.Add("Name", GetType(String))
table.Columns.Add("Number", GetType(Integer))
table.Rows.Add(New Object() {"one", 1})
table.Rows.Add(New Object() {"two", 2})
table.Rows.Add(New Object() {"three", 3})
Return table
End Function
Public Function SelectMethod() As DataTable
If table Is Nothing Then
Return CreateData()
Else
Return table
End If
End Function
Public Function Insert(ByVal newRecord As NewData) As Integer
table.Rows.Add(New Object() {newRecord.Name, newRecord.Number})
Return 1
End Function
End Class
Public Class NewData
Private nameValue As String
Private numberValue As Integer
Public Property Name() As String
Get
Return nameValue
End Get
Set(ByVal value As String)
nameValue = value
End Set
End Property
Public Property Number() As Integer
Get
Return numberValue
End Get
Set(ByVal value As Integer)
numberValue = value
End Set
End Property
End Class
End Namespace