back up codes

always have a backup of your code

Archive for the tag “window”

closing a window

The following code will close an open window upon a linkbutton click.

This code will ask you for a confirmation before closing the window:

lnkbtnClose.Attributes.Add("onclick", "return confirm('Are you sure you want to logout?')")

This code will automatically close the window upon clicking:

lnkbtnClose.Attributes.Add("onclick", "window.close();")

Post Navigation

Follow

Get every new post delivered to your Inbox.