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
Hi!
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 :)
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):
http://world.episerver.com/en/Blogs/Magnus-Paulsson/Dates/2009/4/Generic-Property-Type-Selection-Tree/
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);