Solved

Resize MVC hight trusted app on SP2013

Posted on 2014-03-20
5
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 81

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.

710 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