void ControlTreeDataLoader.LoadData() { if (TagKey == HtmlTextWriterTag.Button) { Attributes.Add("name", EwfPage.ButtonElementName); Attributes.Add("value", "v"); Attributes.Add("type", usesSubmitBehavior ? "submit" : "button"); } EwfPage.Instance.AddPostBack(postBack); if (ConfirmationWindowContentControl != null) { if (usesSubmitBehavior) { throw new ApplicationException("PostBackButton cannot be the submit button and also have a confirmation message."); } confirmationWindow = new ModalWindow(ConfirmationWindowContentControl, title: "Confirmation", postBack: postBack); } else if (!usesSubmitBehavior) { PreRender += delegate { this.AddJavaScriptEventScript(JsWritingMethods.onclick, GetPostBackScript(postBack)); } } ; CssClass = CssClass.ConcatenateWithSpace("ewfClickable"); ActionControlStyle.SetUpControl(this, "", width, height, setWidth); }
// GMS NOTE: Why would we have a constructor that doesn't take a control style if it seems to be absolutely required? /// <summary> /// Creates a new LaunchWindowLink with the given ModalWindow to launch when clicked. /// You must set the ActionControlStyle after creating this object. /// </summary> public LaunchWindowLink(ModalWindow windowToLaunch) { ActionControlStyle = new TextActionControlStyle(""); if (windowToLaunch == null) { throw new ApplicationException("WindowToLaunch must be set on LaunchWindowLink"); } this.windowToLaunch = windowToLaunch; }