Link to home
Create AccountLog in
Avatar of Ze Bra
Ze Bra

asked on

selection from 2 dropdownlists

Hi there,

Still a beginner but I'm moving on :-)
Ok, that's not interesting but now my 'problem'

I've a master- and contentpage. On the masterpage I've 2 dropdownlists, 1 with the ID's and 1 with e.g. Names. Both are from the same (msaccess) datasource.
Now I want to display the record details depending on what's choosen from 1 of the 2 ddl's

My question is how can I do that, is it possible to use an IF statement in the <SelectParameters> region ? ( see my code on what I've produced so far )

Regards
Rob

using VWD2008 / VB / MSAccess
<asp:AccessDataSource ID="AccessDataSource2" runat="server" 
                            DataFile="~/App_Data/inetds.mdb" 
                            SelectCommand="SELECT Id,Name FROM mytable WHERE (Id = ?)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownList1" DefaultValue="" name="Id" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:AccessDataSource>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of CtrlAltDl
CtrlAltDl
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Ze Bra
Ze Bra

ASKER

Hi CtrlAltDl,

Thanx, you sent me in the right direction by saying to use a session variable. I think I can figure it out now in VB.

Regards,
Rob