コード例 #1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            LightboxDropDownList1.SafeSelectValue(PersistentLightboxCartInfo.SelectedLightboxId);
            LightboxDropDownList2.SafeSelectValue(PersistentLightboxCartInfo.SelectedLightboxId);

            Bind();
        }
コード例 #2
0
        protected void LightboxDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Get the selected ID from the control that fired this event
            UserLightboxDropDownList o = (UserLightboxDropDownList)sender;

            // Update session info
            PersistentLightboxCartInfo.SelectedLightboxId = o.SelectedId;

            // Update both dropdowns (as we dont know which one fired it)
            LightboxDropDownList1.SafeSelectValue(o.SelectedId);
            LightboxDropDownList2.SafeSelectValue(o.SelectedId);

            // Reset selected lightbox offset to 0
            PersistentLightboxCartInfo.LightboxOffSet = 0;

            Bind();

            if (LightboxChanged != null)
            {
                LightboxChanged(this, EventArgs.Empty);
            }
        }