Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Resize MVC hight trusted app on SP2013

Posted on 2014-03-20
5
Medium Priority
?
235 Views
Last Modified: 2014-10-06
Hi experts,

I'm developing a MVC high trusted app on our on premise SharePoint 2013 environment.
The app is working well, but the iFrame we're the app reside doesn't resize to the dynamic content of the app.
I've found a lot of sample codes to resize the iFrame using postMessage, but all those articles refer to a Web Form apps where there's an aspx page to hook the code to.
In MVC there's no such page and I can't find anywhere to find the "senderid" I need to communicate with the iFrame parent.

I'm stuck on this for days! so any help would be very appreciated.

Thanks
0
Comment
Question by:hqdev
  • 3
5 Comments
 
LVL 84

Expert Comment

by:David Johnson, CD, MVP
ID: 39944180
mvc apps sure do have aspx pages in your view folder ... mvc apps are split into the view and the controller logic
0
 

Author Comment

by:hqdev
ID: 39944851
I know about the views, (and the're not aspx, the're CSHTML), but I can't use the same code on those, it doesn't work. First I can't get the "senderid", and this is required to communicate with the host.
0
 

Expert Comment

by:Vipul Malani
ID: 40354131
you can use MVC 2.0 where aspx page is available.
0
 

Accepted Solution

by:
hqdev earned 0 total points
ID: 40354209
I found out the way to make SenderId available, we have to put a "dummy" SharePoint object in the project and it appears in the tokens.
Now I'm using post message to communicate outside the apps iFrame.
0
 

Author Closing Comment

by:hqdev
ID: 40363223
Put a SharePoint object in the project like a list and SenderId is appended to the tokens.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Integration Management Part 2
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question