Hi,

I have two combo boxes in an aspx page.

<asp:DropDownList ID="drpCategory" runat="server"

Font-Names="Verdana" Font-Size="8pt"

Width="138px" AutoPostBack="True"

OnSelectedIndexChanged="drpCategory_SelectedIndexChanged"

OnTextChanged="drpCategory_SelectedIndexChanged">

</asp:DropDownList>

 

<asp:DropDownList ID="drpSubcategory" runat="server" Font-Names="Verdana" Font-Size="8pt"
                    Width="138px" >
                </asp:DropDownList>

I need to populate the drpSubcategory depending on the value chosen from drpCategory. As you can see i've added drpCategory_SelectedIndexChanged to catch the change made by the user on the combo box.

I can see the postback happening but the code inside the drpCategory_SelectedIndexChanged is not gettine executed....Any 1 please tell me what i am doing wrong?

Regards,

JK

debug the code...if that event is not raising then check for atuoeventwireup in page directive...it should be true...

hi,

add suotpostback=true to dropdown1

asp:DropDownList ID="drpCategory" runat="server"

Font-Names="Verdana" Font-Size="8pt"

Width="138px" AutoPostBack="True"

OnSelectedIndexChanged="drpCategory_SelectedIndexChanged"

OnTextChanged="drpCategory_SelectedIndexChanged">

</asp:DropDownList>

 

<asp:DropDownList ID="drpSubcategory" runat="server" Font-Names="Verdana" Font-Size="8pt"
                    Width="138px" >
                </asp:DropDownList><asp:DropDownList ID="drpCategory" runat="server"

Font-Names="Verdana" Font-Size="8pt"

Width="138px" AutoPostBack="True"

OnSelectedIndexChanged="drpCategory_SelectedIndexChanged"

OnTextChanged="drpCategory_SelectedIndexChanged">

</asp:DropDownList>

 

<asp:DropDownList ID="drpSubcategory" runat="server" Font-Names="Verdana" Font-Size="8pt"
                    Width="138px"  [B]AutoPostBack="true"[/B]>
                </asp:DropDownList>
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.