Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Window / Using the Target Attribute

This demo contains 1 or more dialog pages. To view them, hover over the dropdown button () in the Example Source Code & Description section
Using the 'Target' Attribute

  • Using RadWindows with links and targets

    The RadWindow object are added to the frames collection of the browser, and links can be easily targeted to open in a particular RadWindow, using the target attribute (just as if opening a link in another frame/iframe/window.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page AutoEventWireup="false" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Window.TargetAttribute.DefaultCS"
        Language="c#" %>

    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
        <!-- custom head section -->
        <!-- end of custom head section -->
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <style type="text/css">
                .bButton
                {
                    width: 150px;
                    height: 20px;
                    border: 0px;
                    background-image: url(../bBtuttonBg.gif);
                    background-repeat: no-repeat;
                    background-color: #fff;
                    font: bold 11px Arial, Verdana, Sans-serif;
                    color: #666666;
                }
                .moduleHeader
                {
                    font: bold 11px Arial, Verdana, Sans-serif;
                    color: #333333;
                    border-bottom: solid 1px #333333;
                    margin-bottom: 10px;
                }
                
                .orderText
                {
                    font: normal 12px Arial,Verdana;
                    margin-top: 6px;
                }
                
                
                .expandImage
                {
                    display: inline-block;
                    background-image: url('<%= Page.ResolveUrl("~/Common/styles09/sprite09.gif")%>');
                    background-position: -596px -1191px;
                    background-repeat: no-repeat;
                    width: 15px;
                    height: 15px;
                }
                * html .expandImage
                {
                    background-position: -596px -1194px;
                }
                * + html .expandImage
                {
                    background-position: -596px -1194px;
                }
            </style>
        </telerik:RadCodeBlock>
    </head>
    <body class="BODY">
        <form runat="server" id="mainForm" method="post">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <qsf:InformationBox ID="InformationBox1" runat="server">
            <span style="font-size: 12px;">This demo contains 1 or more dialog pages. To view them,
                hover over the dropdown button (<span class="expandImage"></span>) in the <em>Example
                    Source Code &amp; Description</em> section</span>
        </qsf:InformationBox>
        <div class="module">
            <div class="moduleHeader">
                Using the 'Target' Attribute</div>
            <table style="height: 500px">
                <tr>
                    <td style="vertical-align: top; width: 220px;" id="NavigationDiv">
                        <a href="http://www.google.com" target="NavigationWindow">Load Google in Navigation
                            Window</a>
                        <br />
                        <a href="http://www.yahoo.com" target="ContentWindow">Load Yahoo in Content Window</a>
                    </td>
                    <td id="ContentDiv">
                    </td>
                </tr>
            </table>
            <telerik:RadWindowManager ID="Singleton" VisibleOnPageLoad="true" runat="server"
                EnableShadow="true">
                <Windows>
                    <telerik:RadWindow OffsetElementID="NavigationDiv" Behaviors="Close" NavigateUrl="./Navigation.aspx"
                        runat="server" Width="210" Height="450" Top="50" Left="60" VisibleStatusbar="false"
                        ID="NavigationWindow">
                    </telerik:RadWindow>
                    <telerik:RadWindow OffsetElementID="ContentDiv" NavigateUrl="../../TestPage/Default.html"
                        runat="server" Width="430" Height="450" Left="55" Top="50" VisibleStatusbar="false"
                        ID="ContentWindow">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
        </div>
        <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451