Hello all,
I've created a datagrid with four columns which included the hyperlink column for viewing more details about the particular data. Click the hyperlink and it will show the details on the different or seperate page based on the querystring. The problem is, when I click the link, it won't load the particular data on the next page. It only load the header instead of the whole row of the particular data.
This is the code for the view details page.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myConnection As MySqlConnection
Dim myCommand As MySqlDataAdapter
Dim strSQL As String
Dim mydataset As DataSet
strSQL = "SELECT speciesid, scientificname,commonname FROM species WHERE speciesid = @speciesid"
myConnection = New MySqlConnection("server=localhost; uid=root; password=kucemari; database=plantsnherbs")
myCommand = New MySqlDataAdapter(strSQL, myConnection)
myCommand.SelectCommand.Parameters.Add(New MySqlParameter("@speciesid", MySqlDbType.Int32))
myCommand.SelectCommand.Parameters("@speciesid").V alue = Request.QueryString("id")
mydataset = New DataSet
myCommand.Fill(mydataset, "species")
Dgspeciesview.DataSource = mydataset.Tables("species").DefaultView
Dgspeciesview.DataBind()
End Sub
Hope you guys can help this out. It doesn't says any error occured but this is not what I wanted. I'm using MySQL for the database and my asp.net is version 1.1.
Thanks