asp.net - Close telerik radwindow from server side in C#? -
i created loading window telerik radwindow not able close server side in c#.
could me?
protected void bt_next_click(object sender, eventargs e) { string script = "function f(){ window.radopen(\"\", \"windows_loading\");sys.application.remove_load(f); }sys.application.add_load(f);"; scriptmanager.registerstartupscript(page, page.gettype(), "key", script, true); //here connect database , insert info database , want close radwindow. }
you can achieve desired functionality this, server side (i.e button click etc):
system.web.ui.scriptmanager.registerstartupscript(page, page.gettype(), guid.newguid().tostring(), "closeradwindow();", true);
then on client side use these jquery methods:
function closeradwindow() { //get reference current radwindow var wndow = getradwindow(); wndow .close(); } function getradwindow() { var owindow = null; if (window.radwindow) owindow = window.radwindow; else if (window.frameelement.radwindow) owindow = window.frameelement.radwindow; return owindow; }
Comments
Post a Comment