I want to create a site action menu item Custom Action which opens a Sharepoint 15 app (default.aspx) as modal dialog. is it possible? thanks.


There is out of the box support for opening a dialog from custom action. Add following attributes to the CustomAction XML node --

  • HostWebDialog : Set it to true if you want to open a dialog
  • HostWebDialogWidth: Width of the dialog
  • HostWebDialogHeight: Height of the dialog

For more information go to my blog here. Hope this would help you.

  • what I meant with site action menu was that menu contians site setting and site content, under the gear. I want to have a menu there that you can open an sharePoint app in a modal winodow. the exampel in your link is for List under EditControlBlock – Medes Aug 8 '14 at 7:49

Open Elements.xml file of custom action and add following attributes in tag.


and then in your aspx page add

<WebPartPages:AllowFraming ID="AllowFraming" runat="server"/>

For detail documentation go to this link - How to create custom action opens in Modal - SharePoint App


You should be able to do it through the following way:

1) Create a SharePoint page: placeHolder.aspx

2) Create an AppPart/Client WebPart for your App and place it on placeHolder.aspx

3) Open placeHolder.aspx inside the Modal Dialog

4) Open the Modal Dialog from a custom action.

  • Do you mean a usual Custom Action or those that came with SharePoint Apps. If it is a usual how do I can point to the app part? and If it is a custom action app then how can I open a modal dialog. I have previously created Custom Actions which opened application pages as modal. but a usual Custom action can not be added to a SharePoint App project. – Medes Feb 27 '13 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.