User-908232760 posted
I'm just not understanding how you link a griview, AccessDataSource and a Querystring variable.
1. I can get the value of the querystring.
2. I can define the AccessDataSource
3. I can see and understand the SelectCommand
I just don't know how to attach the querystring value to the SelectCommand.
This works:
SelectCommand= "SELECT Nomination.Nominee_F_Name, Nomination.Nominee_L_Name, Nomination.ID, Nomination.Nominee_Has_Responded, Awards.Award_Nm, Awards.Award_ID FROM (AWARDS INNER JOIN Nomination ON AWARDS.Award_ID
= Nomination.Award_ID) WHERE Nomination.Award_ID = 2">
This doesn't:
SelectCommand= "SELECT Nomination.Nominee_F_Name, Nomination.Nominee_L_Name, Nomination.ID, Nomination.Nominee_Has_Responded, Awards.Award_Nm, Awards.Award_ID FROM (AWARDS INNER JOIN Nomination ON AWARDS.Award_ID
= Nomination.Award_ID) WHERE Nomination.Award_ID = ' " & Award_ID: & " ' ">
Where Award_ID is defined in the page load as
Dim Award_ID as Int16
Award_ID = Request.QueryString.Item("Award_ID")
At least that's how I used to do it in classic ASP.
What am I missing to make this gridview dynamic?