Try our conversational search powered by Generative AI!

Property opening a dialog using EPi.CreateDialog

I have a problem with using EPi.CreateDialog, when i open the dialog up i get EPi is not defined 764 EPi.RemoveEventListener(this, "load", this.opener.EPiOpenedDialog._DialogLoad); and when i close my dialog from the default.aspx (using EPi.GetDialog().Close(...); i get EPi is not defined 853 EPi.RemoveEventListener(, "unload", this._OnOpenerUnload); In the dialog i have on page_load RegisterClientScriptFile(UriSupport.ResolveUrlFromUtilBySettings("javascript/episerverscriptmanager.js")); RegisterClientScriptFile(UriSupport.ResolveUrlFromUIBySettings("javascript/system.aspx")); RegisterClientScriptFile(UriSupport.ResolveUrlFromUIBySettings("javascript/system.js")); and on the property i have under CreateEditControls() EditButton = new Button(); EditButton.ID = Name + "Edit"; EditButton.Text = "..."; EditButton.CssClass = "epismallbutton"; EditButton.OnClientClick = "OpenPropertyDialog('" + ValueHiddenField.ClientID + "','" + ResponseTextBox.ClientID + "');"; Controls.Add(EditButton); if(!Page.ClientScript.IsClientScriptBlockRegistered("jsscript")){ string js = @""; Page.ClientScript.RegisterClientScriptBlock(typeof(String), "jsscript", js);
Feb 27, 2008 14:05
There is an article (with code samples) regarding Modal Dialogs in EPiServer UI available here:
Feb 27, 2008 14:51
that's one that i've followed, thought, it differs somewhat when you're building a property
Feb 27, 2008 15:38
The problem was that i used Button instead of a HtmlInputButton. Now it works
Feb 27, 2008 15:59


I'm creating a customproperty where I need to use a modal dialog. I have not been able to find an example of this, only the few lines Mikael gave here. If there is an example somewehere that someone could point me to, or if Mikael could be so kind as to present the code for his property that would be very much appreciated :)

Apr 21, 2009 13:44

I used reflector to look at the Page property type editor control when creating my control used in this blog post (source included, so you can look at that one too):

Edited, Apr 21, 2009 14:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.