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" 
        DataFile="c:\dbase.mdb" 
        SelectCommand="SELECT [CcompCode], [compname] FROM [mymain]">
    </asp:AccessDataSource>
    Company Name<asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="AccessDataSource1" DataTextField="compname" 
        DataValueField="CcompCode" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
    </asp:DropDownList>
    <br />
    Financial Year<asp:DropDownList ID="DropDownList2" runat="server" 
        DataSourceID="AccessDataSource2" DataTextField="Fiscalyear" 
        DataValueField="fiscalid">
    </asp:DropDownList>
    
    <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
        DataFile="c:\dbase.mdb" >
    </asp:AccessDataSource>

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

Be a part of the DaniWeb community

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