MVC5 Classic
Set Custom HTML Content

The wijdialog widget supports custom HTML content.

  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.
    <div>
            <div id="dialog" title="Custom HTML">
           <h2> HTML Content</h2><p> You can add custom HTML content.
        <br /></p> Enter text here: <input type="text" id="input1" />
        <br/> And then click: <input type="button" value="Show" onclick="alert(document.getElementById('input1').value)" />
            </div>
        </div>
    
  5. Add the following script to initialize the widget:
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            // debugger
            // $(":wijmo-wijdialog").wijdialog("destroy").remove();
            $('#dialog').wijdialog({
                autoOpen: true,
                captionButtons: {
                    refresh: { visible: false }
                }
            });
        });
        </script>
    

    Run your application. Enter text and click "Show". The pop-up should resemble the following image:

 

 


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

Product Support Forum |  Documentation Feedback