jQuery UI Widgets Forums Layouts Splitter Simple Vertical splitter with an iframe using ASP.NET MVC

This topic contains 1 reply, has 1 voice, and was last updated by  nikhilgupta 4 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • nikhilgupta
    Participant

    Hi, Can any one please provide a basic example of Vertical splitter having an iframe using ASP.NET MVC Razor?

    Using this control with iframe and ASP.NET is easy but I am not getting any idea on how to use it with MVC.

    Following is HTML code that loads another page into the splitter. Can we do this with MVC as well.

    
    <div id="mainSplitter">
            <div style="-ms-overflow-y: hidden; overflow-y: hidden; overflow-x: hidden; -ms-overflow-x: hidden;">
                <iframe id="infoPane" src="../Reports/Reports.html" style="border-bottom: 0PX; border-left: 0PX; border-top: 0PX; border-right: 0PX" frameborder="0"></iframe>
            </div>
            <div style="-ms-overflow-y: hidden; overflow-y: hidden; overflow-x: hidden; -ms-overflow-x: hidden;">
                <iframe id="searchPane" src="" style="border-bottom: 0PX;
                    border-left: 0PX; border-top: 0PX; border-right: 0PX" frameborder="0"></iframe>
            </div>
        </div>
    

    nikhilgupta
    Participant

    Finally I got it, all you need to do is to add a HtmlHelper

    @Url.Action("actionMethod", "Controller")

    to the src attribute of the iframe.

    This can be done inline or using jquery

    $("#infopane").attr("src", '@Url.Action("ReportInfo", "Report")')

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.