Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
0 Points
3 Posts
Jul 29, 2012 01:38 PM|LINK
I am trying to cascade dropdowns using ASP and VB
1st drop down --> Sex Type > Male > Female 2nd Drop Down -->Status > Orphan > Married > UnMarried > Divorced > Widow > Special Need > Normal
Now, If Male selected from 1st drop down, then select (Orphan, Special Need, Married, UnMarried, Divorced, Widow and Normal) from 2nd Drop DownAnd if Female selected from 1st drop down, then select (Orphan, Special Need and Normal) from 2nd Drop DownI am getting data of drop dwons from database using Entities;VB Code
context As New EGrantsModel.Entities ddlSexType.DataSource = context.SEXTYPE ddlSexType.DataValueField = "SEXTYPE" ddlSexType.DataTextField = "SEXTYPE" ddlSexType.DataBind() ddlCitizenStatus.DataSource = context.CITIZENSTATUS ddlCitizenStatus.DataValueField = "CITIZENSTATUSID" ddlCitizenStatus.DataTextField = "CITIZENSTATUS" ddlCitizenStatus.DataBind()
ASP Code
<div class="labelinput"> <asp:Label ID="lblSexType" CssClass="lblwidth" runat="server" Text="">Sex Type</asp:Label> <asp:DropDownList ID="ddlSexType" runat="server"/> </div> <div class="labelinput"> <asp:Label ID="lblCitizenStatus" CssClass="lblwidth" runat="server" Text="">Status</asp:Label> <asp:DropDownList ID="ddlCitizenStatus" runat="server"/> </div>
Can any one guide me in this regards. Thank you
aazizmajid
0 Points
3 Posts
Drop-Down Cascade Issue: How to cascade two drop down
Jul 29, 2012 01:38 PM|LINK
I am trying to cascade dropdowns using ASP and VB
1st drop down --> Sex Type > Male > Female 2nd Drop Down -->Status > Orphan > Married > UnMarried > Divorced > Widow > Special Need > NormalNow,
If Male selected from 1st drop down, then select (Orphan, Special Need, Married, UnMarried, Divorced, Widow and Normal) from 2nd Drop Down
And if Female selected from 1st drop down, then select (Orphan, Special Need and Normal) from 2nd Drop Down
I am getting data of drop dwons from database using Entities;
VB Code
context As New EGrantsModel.Entities ddlSexType.DataSource = context.SEXTYPE ddlSexType.DataValueField = "SEXTYPE" ddlSexType.DataTextField = "SEXTYPE" ddlSexType.DataBind() ddlCitizenStatus.DataSource = context.CITIZENSTATUS ddlCitizenStatus.DataValueField = "CITIZENSTATUSID" ddlCitizenStatus.DataTextField = "CITIZENSTATUS" ddlCitizenStatus.DataBind()ASP Code
<div class="labelinput"> <asp:Label ID="lblSexType" CssClass="lblwidth" runat="server" Text="">Sex Type</asp:Label> <asp:DropDownList ID="ddlSexType" runat="server"/> </div> <div class="labelinput"> <asp:Label ID="lblCitizenStatus" CssClass="lblwidth" runat="server" Text="">Status</asp:Label> <asp:DropDownList ID="ddlCitizenStatus" runat="server"/> </div>Can any one guide me in this regards. Thank you