Avatar of zebrain777
zebrain777
 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

ASP.NET

Avatar of undefined
Last Comment
zebrain777

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
CtrlAltDl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
zebrain777

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
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck