I have a popup window that closes when click ( Cancel ) button, code below :
btnCancel.Attributes.Add("onclick", "window.close();");
but I want to use another button ( Save ) to insert to Database then close the window :
if( success )
{
closePopup();
}
I tried to google this issue but most solutions didn't fix it for me.
Thanks in advanced,
- Update : insert function will be C# code, not javaScript .