(c) 2003 Visual Studio Magazine 
Fawcette Technical Publications

VB.NET	Listing 1
Return Data for Databinding Expressions. These functions take advantage of the DataView object's ability to filter its data with the RowFilter property. You use the ArticleID parameter to find the specific requested record and return it from within the DataView. The first Item(0) finds the row, and the second Item qualifier finds the correct column within the row. You use data returned from these values in databinding expressions in Hyperlink controls.

Protected Function GetCodeUrlText _
	(ByVal ArticleID As String) As String
	Dim dv As DataView = mDS.Tables _
		("codeurl").DefaultView
	dv.RowFilter = "article_ID='" & _
		ArticleID & "'"
	Return CType(dv.Item(0).Item(0), String)
End Function

Protected Function GetCodeUrl _
	(ByVal ArticleID As String) As String
	Dim dv As DataView = mDS.Tables _
		("codeurl").DefaultView
	dv.RowFilter = "article_ID='" & _
		ArticleID & "'"
	Return msPageName & "?ID=" & _
		CType(dv.Item(0).Item(1), String)
End Function

