Need help on setting up a query page using MenuItem, GridView, AcessDataSource components
I'm a college student with an homework assignment to do. I'm developing an website where there is a menu with several items. Each item is configured with an unique ID "idsubcat":
<asp:MenuItemNavigateUrl="Consulta.aspx?idsubcat=1"Text="Espumantes"Value="Vinhos"></asp:MenuItem>
< SelectCommand="SELECT [foto], [marca], [ds_produto], [preco] FROM [produto] WHERE ([cd_sub_categoria] = ?) ORDER BY [preco] DESC"> <SelectParameters> <asp:SessionParameterDefaultValue=""Name="cd_sub_categoria"SessionField="idsubcat" Type="String"/> </SelectParameters> </asp:AccessDataSource>
It doesn't work. It just shows a blank area where the GridView should appear when I run it. Testing the connection with a given DefaultValue works, though.
I have a vague knowledge that MenuItem should pass "MenuItem.SelectedValue" to SessionParameter but I don't know how to do it because I'm using a MasterPage component therefore I'm unable to use MenuItem directly when setting up SQL query parameters. I even tried that but it didn't work either.
I thank you all in advance for any help.

