Solved

Resize MVC hight trusted app on SP2013

Posted on 2014-03-20
5
219 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 78

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now