London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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);