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 / radopen() vs window.open

using RadWindowManager's radopen() function



 


  • RadWindowManager's client-side API provides the radopen() function that can easy and quickly replace the standard browser's popup (window.open()). The RadWindow popup is completely customizable and can blend with any site's design, thus increasing the user experience and usability.

    The main advantages of RadWindow's popup are:

    • Full customization ability that allows you to change RadWindow's look and feel
    • Rich client-side and server-side API that allows you to fully control RadWindow's behavior.
    • Loading pane that is displayed over the content page while it is still loading - controlled by the ShowContentDuringLoad property. 

    The main difference between RadWindow and browser's popup is that just like any other DHTML element, RadWindow exists only in the context of the page in which it is created. It cannot leave the boundaries of the browser window.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

    <%@ Page AutoEventWireup="false" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Window.RadOpen.DefaultCS"
        Language="c#" %>

    <!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 -->
    </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>
            
            <telerik:RadFormDecorator ID="RadFormDecorator1" DecorationZoneID="DecoratedControlsContainer" runat="server" />
            
            <qsf:InformationBox ID="InformationBox1" Title="using RadWindowManager's <strong>radopen()</strong> function" runat="server">
                </qsf:InformationBox>
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow
                        id="RadWindow1"
                        runat="server"
                        showcontentduringload="false"
                        width="400px"
                        height="400px"
                        title="Telerik RadWindow"
                        behaviors="Default">
                    </telerik:RadWindow>
                </Windows>
                </telerik:RadWindowManager>
                <table style="width: 100%;">
                    <tr>
                        <td id="DecoratedControlsContainer">

                            <script type="text/javascript">
                            //<![CDATA[
                            function openRadWin()
                            {
                                radopen("http://www.telerik.com","RadWindow1");
                            }
                            
                            function openPopUp()
                            {
                             window.open("http://www.telerik.com","WindowPopup","width=400px, height=400px, resizable");
                            }
                            
                            //]]>                                                                        
                            </script>
                            <button style="width: 150px; margin-bottom: 3px;" onclick="openRadWin(); return false;">open RadWindow</button><br style="clear:both" /><br style="clear:both" />
                        </td>
                        <td style="width: 50px;">
                            &nbsp;</td>
                        <td style="vertical-align: top; border-left: 1px solid #cccccc; padding-left: 40px;">
                            <button style="width: 170px; margin-bottom: 3px;" onclick="openPopUp(); return false;">open browser's popup</button><br style="clear:both" /><br style="clear:both" />
                        </td>
                    </tr>
                </table>
            
            <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