i have the following function in my app_code which gets the data from database with datareader
now on anothe page i need to output all of the data to a label
i do not want to use datalist or gridview
hwo should i do this?
the function loops through the data ,i can put the function on the same page and use label.text += mydata
but since it's a function and i want to use it on other pages how is it possible?
Public Function getMembers(ByVal userID As Integer) As Boolean
Dim Conn As New SqlConnection(HttpRuntime.Cache("con"))
Dim dr As SqlDataReader
Dim strSQL As String
strSQL = "select * from test "
Dim cmd As New SqlCommand(strSQL, Conn)
cmd.Parameters.Add(New SqlParameter("@userID", userID))
dr = cmd.Execute
View Complete Post