Solved

Resize MVC hight trusted app on SP2013

Posted on 2014-03-20
5
230 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 80

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

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…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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