Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi everyone,
this code is home.cshtml and it didn't work. in the comment line iframe it's work but I need razor to bring the data. how can i fix this problem?
<div style="position:relative !important;"> <!--iframe onload="resizeIframe(this)" scrolling="no" class="SliderMainExternal" src="/slider-partial/slider-part-en.html" style="overflow:hidden;width:100%;margin-top:-75px;"></iframe--> <iframe onload="resizeIframe(this)" scrolling="no" class="SliderMainExternal" src="@Html.Raw("/Views/slider.cshtml")" style="overflow:hidden;width:100%;margin-top:-75px;"></iframe> <a class="scroll-down" address="true"></a> </div>
home.cshtml dependencies these
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @inherits UmbracoTemplatePage @{ Layout = null; }
Hi Ozgur
The issue is that you do not render the view as HTML, use one of the methods described in this thread - https://stackoverflow.com/questions/483091/how-to-render-an-asp-net-mvc-view-as-a-string
You need to render view to pass it as HTML string to an iframe.
There is nothing with Umbraco in this problem, it's pure razor + html issue.
Thanks, Alex
Did you solve the issue? Can you share with our community?
Alex
Hi alex,
Thank you very much for your help, but this structure (iframe) did not meet my wishes and I blew it up :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
i cant display iframe with razor
hi everyone,
this code is home.cshtml and it didn't work. in the comment line iframe it's work but I need razor to bring the data. how can i fix this problem?
home.cshtml dependencies these
Hi Ozgur
The issue is that you do not render the view as HTML, use one of the methods described in this thread - https://stackoverflow.com/questions/483091/how-to-render-an-asp-net-mvc-view-as-a-string
You need to render view to pass it as HTML string to an iframe.
There is nothing with Umbraco in this problem, it's pure razor + html issue.
Thanks, Alex
Hi Ozgur
Did you solve the issue? Can you share with our community?
Alex
Hi alex,
Thank you very much for your help, but this structure (iframe) did not meet my wishes and I blew it up :)
is working on a reply...