There is an easy way to use a objectdatasource in VB.Net code. Drag an objectdatasource control on your webform.
Then, in the page load event, use the following code:
Dim mySource As ObjectDataSource = ObjectDataSource1
Dim result As IEnumerable = mySource.Select()
Dim row As DataRowView
For Each row In result
'your code here
'you can acces any field in a row:
' myString = row("table field name")
Next
Sunday, October 01, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment