Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
#region OnlineFormTypeControl public class OnlineFormTypeControl : EPiServer.Web.PropertyControls.PropertySelectControlBase { protected override void SetupEditControls() { try { EditControl.AutoPostBack = true; EditControl.EnableViewState = true; EditControl.SelectedIndexChanged += new EventHandler(EditControl_SelectedIndexChanged); if (EditControl.Items.Count <= 0 editcontrol.items.add new listitempolling polling editcontrol.items.add new listitemfeedback feedback if editcontrol.selectedvalue ="null)" editcontrol.selectedvalue="OnlineFT.Value.ToString();" clientscript. scriptmanager.current.addeventlistenereditcontrol new clientscript.events.disablepageleaveeventclientscript.eventtype.change editcontrol.attributes.addonchange>" ); } catch (Exception ex) { HttpContext.Current.Response.Write(ex); throw ex; } } void EditControl_SelectedIndexChanged(object sender, EventArgs e) { HttpContext.Current.Session[GlobalConstants.CONST_SESSION_DDLFORMTYPE] = EditControl.SelectedItem.Value; } public OnlineFormType OnlineFT { get { return PropertyData as OnlineFormType; } } } #endregion #region OnlineReportTypeControl public class OnlineReportTypeControl : EPiServer.Web.PropertyControls.PropertySelectControlBase { protected override void SetupEditControls() { try { if (HttpContext.Current.Session[GlobalConstants.CONST_SESSION_DDLFORMTYPE] != null) { if (HttpContext.Current.Session[GlobalConstants.CONST_SESSION_DDLFORMTYPE].ToString() == "Polling") { EditControl.Items.Add( new ListItem("Statistical Result", "Statistical")); EditControl.Items.Add( new ListItem("Graphical Result", "Graphical")); EditControl.Items.Add( new ListItem("Statistical and Graphical Result", "Statistical_Graphical")); } else EditControl.Items.Add( new ListItem("QA/General Report", "General")); HttpContext.Current.Session["sFormTypeDropDown"] = null; } //if (EditControl.SelectedValue != null) // EditControl.SelectedValue = OnlineReport.Value.ToString(); } catch (Exception ex) { HttpContext.Current.Response.Write(ex); throw ex; } } public OnlineReportType OnlineReport { get { return PropertyData as OnlineReportType; } } } #endregion =>