open new window from inside an ajax panel

2 posts, 0 answers
  1. Mridul
    Mridul avatar
    1 posts
    Member since:
    Feb 2012

    Posted 26 Apr 2012 Link to this post

    i have a radbutton inside radajax panel. on button click i want a page "mypage.aspx" to be opened in a new window. How can i achieve this ? page.open doesnt work since the button is inside ajaxpanel.. Please help!!
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Apr 2012 Link to this post

    Hi Mridul,

    Here is the sample code that I tried to achieve your scenario.

    ASPX:
    <telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">
          <telerik:RadButton ID="RadButton1" runat="server" OnClientClicked="OnClientClicked">
          </telerik:RadButton>
    </telerik:RadAjaxPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
          <Windows>
                <telerik:RadWindow ID="RadWindow1" runat="server">
                </telerik:RadWindow>
          </Windows>
    </telerik:RadWindowManager>

    JS:
    <script type="text/javascript">
        function OnClientClicked(sender, args)
        {
            var window = $find("<%= RadWindow1.ClientID %>");
            radopen("grid.aspx", window);
        }
    </script>

    Thanks,
    Princy.
Back to Top