protected void dvGallery_PreRender(object sender, EventArgs e) { if (!Page.IsPostBack) { if (dvGallery.CurrentMode == DetailsViewMode.Insert) { CMS.Web.Controls.DropDownList ddlMenus = dvGallery.FindControl("ddlMenus") as CMS.Web.Controls.DropDownList; int iMenuID = CMS.Utils.ToInteger(Request.QueryString["MenuID"]); try { ddlMenus.CValue = iMenuID; } catch { } } } }
protected void ddlMenus_SelectedIndexChanged(object sender, EventArgs e) { CMS.Web.Controls.DropDownList ddlMenus = (CMS.Web.Controls.DropDownList)sender; ddlMenus.CValue = CMS.Utils.ToInteger(ddlMenus.SelectedValue); }