I have asp.net button "OK" in html popup window. I after my logic done how close that popup window it self?
<asp:Button Id="btnOK" runat="server" AccessKey="<%$Resources:
wss,multipages_okbutton_accesskey%>" Width="70px" Text="<%$Resources:wss,
multipages_okbutton_text%>" OnClick="btnOK_Click" />
<asp:Button ID="btnOK" runat="server" OnClientClick="window.close(); return false;" Text="Close" />
All correct but there is another way if you want close the window in your code:
Suppose that the button ID is "ContineButton" and the click event handler name is "ContineButton_Click"
protected void ContineButton_Click(object sender, EventArgs e)
{
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "window.close()", true);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With