-2

I'm trying to close an aspx modal from code-behind using this code-

ScriptManager.RegisterStartupScript(this, this.GetType(), "Close_Window", "self.close();", true);

It works perfectly well when I use Google Chrome, but Internet Explorer fails. Any ideas why?

Thanx in advance for the assistance

Code Vader
  • 739
  • 3
  • 9
  • 26

1 Answers1

0

try this for IE

ClientScript.RegisterClientScriptBlock(GetType(), "Javascript", "<script>self.close();</script>");
Nazir Ullah
  • 610
  • 5
  • 13