I have a provider hosted App and need to use modals in my App Pages. Is it possible to use SP Modal Dialogs from SP.UI.Dialog.js ?

What JS files are required to be included?


Never done it myself but I don't see any reason for why it can't done.

This sample shows how to build user interfaces in SharePoint-hosted apps that use the callout and dialog controls.

Check this out,

SharePoint 2013: Use list views, callouts, and dialogs in SharePoint-hosted apps

I don't have SharePoint 2013 component installed but if you look at solution provided in link in Default.aspx page you will find reference to this which means you can use it in apps.

<script type="text/javascript" src="/_layouts/15/sp.ui.dialog.js"></script>


It's not possible, you might be able to trick SharePoint but then you will need to make changes to host web as described in this post.

| improve this answer | |
  • Your example is related to SharePoint-hosted App, but my question is about Provider-hosted App. – Warlock Sep 17 '13 at 8:47
  • @Warlock why is it not tagged as Provider-hosted then? Where do you mention Provider Hosted? – Robert Lindgren Sep 17 '13 at 9:14
  • @RobertLindgren It was mentioned at the beginning of my question :) Thanks for the tag. – Warlock Sep 17 '13 at 9:16
  • @Warlock, my blindness is astonishing ;) – Robert Lindgren Sep 17 '13 at 9:17
  • 1
    @Warlock based on the search I just did seems like what you are trying to do is not possible, unless you do some trick as described in the last post of this link social.technet.microsoft.com/Forums/sharepoint/en-US/… – Muhammad Raja Sep 17 '13 at 9:23

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.