CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    47

    [RESOLVED] window.open is not working since AJAX

    hi...

    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
    Posts
    47

    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
  •  





Click Here to Expand Forum to Full Width

Featured