Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda