Start New Discussion Reply to this Discussion Generate second drop down list from first all from database
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!!
Related Article: Help Required
is a Web Development discussion thread by deepakpandeyece that has 1 reply, was last updated 9 months ago and has been tagged with the keywords: select, ajax.
grafic.web
Newbie Poster
9 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
JustineAubrey
Newbie Poster
7 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.3192 seconds
using 2.72MB