1.11M Members

Generate second drop down list from first all from database

 
0
 

Hi there, i got stuck with this problem!!!

I have 2 drop down list, the first one come from the table "categorie" and till here no problem, the proble is that i would like to generate the second drop down list , which come from the table "subcategorie" beacause of what we have choose in the first one!!

thanks for your help!!

 
0
 

I need help with this as well... here's my code for the data sources:

<asp:SqlDataSource ID="SystemDataSource" runat="server"
        ConnectionString="server=fafsv-mysql.gsa.co.santa-clara.ca.us;User Id=root;database=gsais;password=0263;Persist Security Info=True"

        
        SelectCommand="SELECT DISTINCT [SystemName] FROM [blsys_systems]" 
        ProviderName="MySql.Data.MySqlClient">
        <SelectParameters>
            <asp:ControlParameter ControlID="SystemDropDown" Name="SystemName"
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:SqlDataSource>

    <asp:SqlDataSource ID="LocationDataSource" runat="server"
        ConnectionString="server=fafsv-mysql.gsa.co.santa-clara.ca.us;User Id=root;database=gsais;password=0263;Persist Security Info=True"

        
        SelectCommand="SELECT DISTINCT [SystemName] FROM [blsys_systems] WHERE ([LocationName] = @LocationName)" 
        ProviderName="MySql.Data.MySqlClient">
        <SelectParameters>
            <asp:ControlParameter ControlID="SystemDropDown" Name="SystemName"
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:SqlDataSource>

and for the VB part:

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        SystemDropDown.SelectedValue = Request.QueryString("SystemName")
        LocationDropDown.SelectedValue = Request.QueryString("LocationName")
    End Sub
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article