I'm currently searching for how to use this form correct..
I'm using ASP 4.0 in a DNN surface but I can't see the instance of selectrow(),
deleterow() and the rest are active but it seems like selectrow() is dissapeared.
Does anyone got the same problem as me?
Dim Dr As SqlClient.SqlDataReader
Dim conn As New SqlClient.SqlConnection
Dim com As New SqlClient.SqlCommand
gridProject.SelectRow(e.CommandArgument) '(this one doesn't work out for me)
conn.ConnectionString = ConfigurationManager.ConnectionStrings("Help").ConnectionString
conn.Open()
com.Connection = conn
com.CommandText = "Select init from favorites where init='" & Session("init").ToString() & "' and projectid='" & gridProject.SelectedDataKey.Value.ToString & "'"
Dr = com.ExecuteReader()
If Not Dr.HasRows Then
Dr.Close()
com.CommandText = "insert into favorites(init,projectid) select '" & Session("init").ToString & "','" & gridProject.SelectedDataKey.Value.ToString & "'"
com.ExecuteNonQuery()
gridFavorites.DataBind()
Else
Dr.Close()
End If
conn.Close()
thanks in advance

New Topic/Question
Reply




MultiQuote


|