Link to home
Create AccountLog in
Avatar of VonGeist
VonGeist

asked on

create multi column drop down list in visual studio vb.net and extract data (similar to ms Access)

I am trying to create a drop down list with 5 columns.  Once an item is selected I would like to move those columns to different text boxes on my form.  I know I could do it when I used access 2003 and don't know if there is the same capability in Visual studio and VB.Net 2003.  I have the AJAX controls installed and my form is defined as an AJAX page.  If it's not possible,  I can probably do a work around but it wouldn't be pretty.

The code shows the makeup of the drop down box and the 3 text boxes that I want to move the data to.
<asp:DropDownList ID="ddl1" runat="server" DataSourceID="SqlDataSource1"
                DataTextField="PlanCode" DataValueField="PlanCode" Width="182px" AppendDataBoundItems="True" CausesValidation="True" AutoPostBack="True">
            </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebEnrollDetailConnectionString %>"
                SelectCommand="SELECT [PlanCode], [PlanDesc], [id], [StaticPremium], [Customer_ID], [Coverage] FROM [PlanLookUp]">
            </asp:SqlDataSource>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>&nbsp;
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal 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