I've two Drop Down List Box in a form and need to change the 2nd dropdown lists value on selection of 1st dropdownlist. I've following code

<asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        SelectCommand="SELECT [CcompCode], [compname] FROM [mymain]">
    Company Name<asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="AccessDataSource1" DataTextField="compname" 
    <br />
    Financial Year<asp:DropDownList ID="DropDownList2" runat="server" 
        DataSourceID="AccessDataSource2" DataTextField="Fiscalyear" 
    <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
        DataFile="c:\dbase.mdb" >

the 2nd dropdownlist should selection based on company code, it means dropdownlists data value
How to do it Help needed

Recommended Answers

All 3 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.