CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: [RESOLVED] window.open is not working since AJAX

  1. #1
    Join Date
    Aug 2007

    [RESOLVED] window.open is not working since AJAX


    i had an aspx file, which included this code behind:
    Response.Write("<script type=\'text/javascript\'>" + "window.open(\'selCols.aspx?bd=" + vidBaseDatos + "&vista=" + vidVista + "\', \'VentanaEmergente\', " + "\'width=800, height=600, scrollbars=yes, resizable=no\')" + "</script>");

    it used to open another popup windows, in which i selected some items and save those items...

    but since i use AJAX (ScriptManager and UpdatePanels) it gives me a ParserErrorException or somethign like that once it gets to my Response.Write...

    how can i get it to work now?
    i've read that with ScriptManager.RegisterClientBlock or StartupScript... but when i try it it fails because i use this in my aspx file:
    partial class vistas : ExtensionPagina.PaginaBase
    and not the system.web.ui page...

    so, when i try the above... it stops recognizing me my ScriptManager control...

    thanks in advance...

  2. #2
    Join Date
    Aug 2007

    Re: window.open is not working since AJAX

    i've solved it
    for future references:

    System.Web.UI.ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "SCRIPT", "window.open('page.aspx')", true);

    take care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)