Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anton 135 posts 186 karma points
    Mar 04, 2012 @ 21:47
    Anton
    0

    Node property question

    I have two dropdownlist property

    first BMW,Mersedes,Audi

    second models of this cars

    How I can do event, that when I choose Mersedes in second dropdown set items(S class,C class,E class)?

    I try to do my datatype with event SelectedIndexChanged, but it dosent work(((

    public partial class Drop : System.Web.UI.UserControl,umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor

        {

            protected void Page_Load(object sender, EventArgs e)

            {

     

                DropDownList1.Items.Add("BMW");

                DropDownList1.Items.Add("Mersedes");

                 DropDownList1.Items.Add("Audi");

     

            }

     

            #region IUsercontrolDataEditor Members

     

            public object value

            {

                get

                {

                    return DropDownList1.SelectedValue;

                }

                set

                {

                }

            }

     

            #endregion

       protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

            {

    //this event dosent work. Why? DropDownList1 has AutoPostBack="true"

                DropDownList2.Items.Add("S-class");

            }

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Mar 05, 2012 @ 11:01
    Lee Kelleher
    0

    Hi Anton,

    Quick check, is the OnselectedIndexChange event on your DropDownList control wired up in the mark-up?

    <asp:DropDownList ID="DropDownList1" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true" ... >

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft