Resize MVC hight trusted app on SP2013

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
hqdevAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
hqdevConnect With a Mentor Author Commented:
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
 
David Johnson, CD, MVPOwnerCommented:
mvc apps sure do have aspx pages in your view folder ... mvc apps are split into the view and the controller logic
0
 
hqdevAuthor Commented:
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
 
Vipul MalaniSr. Software EnginnerCommented:
you can use MVC 2.0 where aspx page is available.
0
 
hqdevAuthor Commented:
Put a SharePoint object in the project like a list and SenderId is appended to the tokens.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.