Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Close window from codebehind after server-sided action

I tried several ways to fulfill the action: Protected Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click saveLestijden() 'Response.Write(" { window.close(); }") 'Page.ClientScript.RegisterStartupScript(Page.GetType(), "alert", "window.close();", True) 'Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "closePage", "window.onunload = window.close();") Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "closePage", "window.onunload = window.opener.close();") End Sub

No one is working If this is not possible, is there a way to close the window by for example a button ( also after a postback) I tried : Protected Sub btnTerug_Click(sender As Object, e As EventArgs) Handles btnTerug.Click

    Dim Script As String = "window.close();"
    System.Web.UI.ScriptManager.RegisterClientScriptBlock(btnTerug, Me.GetType(), "Test", Script, True)
End Sub

also nothing works. Before the postback I can close the window, but after savelestijden() the button does not work. PLease help ....

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda