Hi
I'm opening an aspx page with javascript:
window.showModalDialog("mypage.aspx", "", "status:no");
In mypage.aspx I've got a button which shall first save the displayed
record
in the C# code behind (this works fine) and if successfull, mypage.aspx
shall be closed (window.close).
Data saving and so on is working fine. My problem is the <... if
successfull, .... shall be closed>.
It is very urgent for me.
Can any one help me with this?
Can email directly to my mail id lakshmi.gade@gmail.com
Thanks in advance.
Kris - 18 Feb 2006 07:56 GMT
Hi Laks,
Call window.close(); method after saving the data.
Since it is a javascript function use RegisterClientScriptBlock method
after saving the data.
Hope this would help you.
Cheers,
Kris
Eliyahu Goldin - 19 Feb 2006 09:20 GMT
You can provide a hidden input element for communicating actions from server
to client. If the server saves the form successfully, it will set the hidden
input value to "CLOSE". The client will get this value in the body's onload
event and call window.close().
Eliyahu
> Hi
> I'm opening an aspx page with javascript:
[quoted text clipped - 13 lines]
> Can email directly to my mail id lakshmi.gade@gmail.com
> Thanks in advance.