hi,
I have a Gridview like below:
What I want is:
1) User can click at LINE column, for example user click at M23 and it will redirect to other page.
2) At the other page, it will display something like this:
Please insert countermeasure for M23
where M23 is get from what user click.
How can I do that?
Here is my code:
Dim DBConn As New SqlConnection("server=xxxx;uid=xxxx;pwd=xxxx;database=xxxx")
Dim DBCmd As New SqlCommand
Dim da As New SqlDataAdapter
Dim ds As New DataSet()
Dim strtTime As String
Dim endTime As String
strtTime = DateTime.Today.ToString("yyyy/MM/dd") & " " & "06:15:00"
endTime = DateTime.Today.ToString("yyyy/MM/dd") & " " & "18:15:00"
Try
DBConn.Open()
Dim SQLstr As String = " SELECT LINE, SUM(KYUERR1 + VISION1 + KEIJYOU1) AS PICKUP_ERR, SUM((KYUERR1 + VISION1 + KEIJYOU1) * UNITCOST) AS RM "
SQLstr &= " FROM VAC_JSINFO "
SQLstr &= " WHERE (COLLECTDATE > '" & strtTime & "') AND (COLLECTDATE < '" & endTime & "') AND (KYUERR1 >= 0) "
SQLstr &= " GROUP BY LINE "
SQLstr &= " ORDER BY RM DESC "
Dim myCommand As New SqlCommand(SQLstr, DBConn)
da.SelectCommand = myCommand
da.Fill(ds)
GridView1.DataSource = ds
GridView1.DataBind()