ComponentOne Dialog for ASP.NET Web Forms
Task-Based Help / Using the Modal Dialog Option / Creating a Modal Dialog Box
In This Topic
    Creating a Modal Dialog Box
    In This Topic

    This topic will walk you through setting C1Dialog as a modal dialog box in Design View, in Source View, and in Code.

    In Design View

    Complete the following steps:

    1. In the C1Dialog Properties window, scroll down to the Modal property.
    2. Use the drop-down menu to set the property to True.
    3. Press F5 or start debugging to run your program. Note that until you close the Modal window, you have no control over the rest of the page.

    In Source View

    Complete the following steps:

    1. Add the following markup within the <cc1:C1Dialog> tags:

      To write code in Source View

      Modal="True"
    2. Run your program and note the effect the Modal window has on the rest of the Web page.

    In Code

    Add the following code to the Page_Load event to set C1Dialog's Modal property.

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Dialog1.Modal = True

    To write code in C#

    C#
    Copy Code
    this.C1Dialog1.Modal = true;