ComponentOne Extender Controls for ASP.NET Web Forms
Wijmo Control Toolkit Extender Controls / C1LightBoxExtender / Displaying External Content in the LightBox
In This Topic
    Displaying External Content in the LightBox
    In This Topic

    The C1LightBoxExtender supports displaying the content of URL in an iFrame. In this example you'll set the Player property to "iframe" and display a Web site in the lightbox.

    Complete the following steps:

    1. Create a new ASP.NET Web application.
    2. In the Solution Explorer, right-click the project and choose Add Reference. Locate and add a reference to the C1.Web.Wijmo.Extenders assembly.
    3. Switch to Source view, and add the following markup at the top of the page to register the assembly:

    <%@ Register Assembly="C1.Web.Wijmo.Extenders.4" Namespace="C1.Web.Wijmo.Extenders.C1LightBox" TagPrefix="LightBox" %>

    Note that you may need to edit the above depending on the assembly you are using.

    1. Add the following markup within the main <div> tag to add a Panel with content:

    <asp:Panel ID="Panel1" runat="server">

        <a href="http://www.componentone.com" rel="wijlightbox[stock]">

            <img src="http://cdn.wijmo.com/images/componentone_thumb.png" alt="ComponentOne"</a>

        <a href="http://www.microsoft.com" rel="wijlightbox[stock]">

            <img src="http://cdn.wijmo.com/images/microsoft_thumb.png" alt="Microsoft" /></a>

    </asp:Panel>

    The above markup adds twoWeb sites to the panel's content.

    1. Add the following markup just below the Panel markup to set the lightbox extender:

    <LightBox:C1LightBoxExtender ID="Panel1_C1LightBoxExtender" runat="server" TargetControlID="Panel1" Player="Iframe" MaxWidth="960" MaxHeight="600">

    </LightBox:C1LightBoxExtender>

    The Player option is set to "iframe" so the Web site content will be displayed.

    What You've Accomplished

    Press F5 to run your application, click an image, and notice that a Website is displayed in the lightbox. You can interact with the Web site within the lightbox or choose another Web site to view.