MVC5 Classic
Set External Content

The wijdialog widget supports displaying external content, either from another page in the same project or from an external Web site. See the Dialog > External Content sample of the MVC Control Explorer live demo at http://demo.componentone.com/ASPNET/MVCExplorer/dialog/ContentUrl

  1. Create an C1 ASP.NET MVC 5 Web Application.
  2. In the Solution Explorer, expand the Views | Shared folder and double-click _Layout.cshtml to open the file.
  3. Check the dependencies to make sure the project is referencing the latest version of Wijmo. These should be placed within the <head> tags of the page. You can find the latest version of the Wijmo dependencies at http://wijmo.com/downloads/cdn/.
  4. Add the following markup within the <body> tags of the page to create a dialog window.
    <div id="dialog" title="Search!">
            </div>
        </div>
    
  5. Add the following script to initialize the widget:
    <script id="scriptInit" type="text/javascript">
            $(function () {
                /$(":wijmo-wijdialog").wijdialog("destroy").remove();
                $("#dialog").wijdialog({ width: 840, height: 640, contentUrl: 'http://www.yahoo.com', autoOpen: true });
            });
        </script>
    
  6. Run your application to view the external content.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback