0

I have created Provider hosted add-in with MVC, in that I have some Controllers, Models and Views.

I just want to render the Views inside the Sharepoint add-in, so that when I add that particular add-in into a SharePoint page it should render the View part

How can this be done?

0

You need to add a client Web Part, but doing the following:

"Right-click the SharePoint Add-in project (not the web application project), and then choose Add > New Item > Office/SharePoint > Client Web Part (Host Web). ("Client Web Part" is another name for "add-in part".)" (reference: https://msdn.microsoft.com/en-us/library/office/fp179921.aspx)

While the example is for a ASP Forms project, it seems to work just as well for an MVC project. You can either create a new web page (view) or point to an existing one (the reference is controlled by the element.xml) "< Content Type="html" Src="~remoteAppUrl/ClientWebPartPage?{StandardTokens}" / >"

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.