i have a 2 column datagrid (account_id, account). the second is a hyperlink
column with a URL Column account_id and a URL Format String
EnterTargets.aspx?id={0}. It looks like it's passing the variable (if that's
the right terminology) to the new page. The new page ends
/EnterTargets.aspx?id=14031. so, my problem is, how to use that variable on
the page?
the page loads a dropdown list with the months of the year in it (MonthID,
MonthDesc), and defaults to january. i have a datagrid on the page
/EnterTargets that's supposed to pull data from a sql table and show only
data for the month in the dropdown and related to account 14031 in this
case. i think the month code works but i'm to sure what to write to pass the
variable from the prior page. i'm stuck. any help would be great! thanks! My
code for the datagrid is:
Private Sub BindData(ByVal _ID As String)
Dim _SqlTargets As String = "Select account_id, category_id,
month_id, goal_dollars from goals_test where month_id = " & _ID
Dim _Ds As New DataSet
Dim _SqlConnection As New SqlConnection(strConn)
Dim _SqlCommand As New SqlCommand(_SqlTargets, _SqlConnection)
Dim _SqlDataAdapter As New SqlDataAdapter(_SqlCommand)
_SqlConnection.Open()
_SqlDataAdapter.Fill(_Ds)
DataGrid1.DataSource = _Ds
DataGrid1.DataBind()
End Sub