Code To Close Window -

How to close window from codebehind

Snippet Code

Rate this page :
  [ 0 votes]

Here, the code allows you to close the window from codebehind By calling on the ScriptManager or page you can able to close the window.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "close", "window.close();", True) End Sub


Ask Questions

Ask Question