tags:

views:

19

answers:

1

The code works fine on my dev machine (localhost), but after I moved it to the dev server, my drop down lists SelectedIndexChanged routine is not triggered.

What gives? I am lost...any input is appreciated.

using asp.net 3.5 c#

protected void Page_Load(object sender, EventArgs e)
        {
            ddlDepartments.SelectedIndexChanged += new EventHandler(ddlDepartments_SelectedIndexChanged);
            ddlSections.SelectedIndexChanged += new EventHandler(ddlSections_SelectedIndexChanged);


            btnAddMethod.Enabled = false;
            txtRepSplitsNum.Visible = false;
            lblRepSplitsNum.Visible = false;


            //at first load, populate the departments list
            if (!IsPostBack)
            {
                m_dtDeptsList = m_dataController.GetDepartments();

                HttpHelper.StoreInSession(Keys.deptsList, m_dtDeptsList);
                UIUtils.BindDropDownList(ref ddlDepartments, m_dtDeptsList, DeptsDDLColumns.deptCode, DeptsDDLColumns.deptName, true);
            }

        }

protected void ddlDepartments_SelectedIndexChanged(object sender, EventArgs e)
        {

            ddlMethods.ClearSelection();
            ddlMethods.Enabled = false;



            Response.Write(ddlDepartments.SelectedValue);


            DataTable dt = m_dataController.GetDepartmentSections(ddlDepartments.SelectedValue);

            UIUtils.BindDropDownList(ref ddlSections, m_dataController.GetDepartmentSections(ddlDepartments.SelectedValue), SectsDDLColumns.sectCode, SectsDDLColumns.sectName, true);
        }

in my aspx

<asp:DropDownList ID="ddlDepartments" runat="server"  AppendDataBoundItems="true" OnSelectedIndexChanged="ddlDepartments_SelectedIndexChanged" AutoPostBack="true" onchange="needToConfirm = false;">
                 </asp:DropDownList>
A: 

problem found

viewstate was off on the development server

gnomixa