G
Guest
Hi,
I am opening an Modal dialog box using the window.Showmodaldialogbox(), and
in that window i am having an aspx form with say one ASP.NET Button control.
i am doing some operation on the click event of the button control on the
server and finally closing the window by using the following statement at the
end of the click event of the button:
Response.Write("<script language='javascript'>window.close();</script>");
But instead of closing the windw, its poping up same window once again.
This behavior is specifict to the window.Showmodaldialogbox(), if i will
use simple window.open() then everything works fine.
i also tried to add the attribute to the button control but its giving the
same problem.
Button1.Attributes.Add("onclick","window.close()");
Can anybody help me out in this case to close the window after performing
some operation in the click event of the button.
Thanks
Hitesh
I am opening an Modal dialog box using the window.Showmodaldialogbox(), and
in that window i am having an aspx form with say one ASP.NET Button control.
i am doing some operation on the click event of the button control on the
server and finally closing the window by using the following statement at the
end of the click event of the button:
Response.Write("<script language='javascript'>window.close();</script>");
But instead of closing the windw, its poping up same window once again.
This behavior is specifict to the window.Showmodaldialogbox(), if i will
use simple window.open() then everything works fine.
i also tried to add the attribute to the button control but its giving the
same problem.
Button1.Attributes.Add("onclick","window.close()");
Can anybody help me out in this case to close the window after performing
some operation in the click event of the button.
Thanks
Hitesh