New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Using the Target Attribute

The RadWindow objects on your page are automatically added to the frames collection of the browser. As a result, you can use the RadWindow objects as the target of a link, just as you link to any other frame or window.

When you use the RadWindow as the target of a link, the link will not open unless the window is currently visible. You can prevent this limitation by adding an onclick attribute to the link in which you open the window.


Copy the following markup into your default.aspx source. Run the application and click on both links. Observe that the target attribute opens each specified URL in the target window. Close both windows, and click the links again. Notice that the Navigation link, which has an onclick attribute, reopens and displays the Google Web site, but the Content link no longer works.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <table style="height: 500px">
            <td style="vertical-align: top; width: 220px;" id="NavigationDiv">
                <a href="" target="NavigationWindow" onclick="window.radopen(null, 'NavigationWindow');">
                    Load Google in Navigation Window</a>
                <br />
                <a href="" target="ContentWindow">Load Yahoo in Content Window</a>
            <td id="ContentDiv" style="width: 213px">
                <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" Skin="Vista" VisibleOnPageLoad="True">
                        <telerik:RadWindow RenderMode="Lightweight" OffsetElementID="NavigationDiv" runat="server" Width="200px" Height="200px"
                            Top="50px" ID="NavigationWindow" Style="display: none;" Behaviors="Default" InitialBehaviors="None"
                            Title="Navigation Window">
                        <telerik:RadWindow RenderMode="Lightweight" OffsetElementID="ContentDiv" runat="server" Height="400px" ID="ContentWindow"
                            Style="display: none;" Behaviors="Default" InitialBehaviors="None" Title="Content Window">

See Also

In this article