When I save a Sitecore element, I try to display a popup for user interaction. Depending on the data that they changed, I can display a series of 1 or 2 pop-ups asking them if they want to continue. I figured out how to connect to the OnItemSaving pipeline. It's simple. I cannot figure out how to display the popup and respond to user input. Now I think that I should somehow use the Sitecore.Context.ClientPage.ClientResponse object. Here is some code that shows what I'm trying to do:
public class MyCustomEventProcessor { public void OnItemSaving(object sender, EventArgs args) { if([field criteria goes here]) { Sitecore.Context.ClientPage.ClientResponse.YesNoCancel("Are you sure you want to continue?", "500", "200"); [Based on results from the YesNoCancel then potentially cancel the Item Save or show them another dialog] } } }
Should I use a different method? I see that there are also ShowModalDialog and ShowPopUp and ShowQuestion, etc. I can not find any documentation on them. Also, I'm not even sure if this is the right way to do something like this.
source share