asp.net - aspxGridView disappears when showing javascript alert but reappears when alert is closed -
i have usercontrol aspxgridview inside it. use usercontrol in page in separate updatepanel (named updlistview). in update panel (updform) have button , code checks conditions raise javascript alert message. when alert message pops up, user control stays gridview temporarily disappears long alert message showing up. close alert, grid view appears. bug need fix not find solution.
any appreciated.
i using server side alert message
string strscript = string.format("javascript:alert('{0}');", "my message"); scriptmanager.registerstartupscript(this.page, this.gettype(), "alertmessage", strscript, true);
i used above code achieve desired result
if (!string.isnullorempty(message.trim())) { message = message.replace("\\n", "\\\\n"); string script = "settimeout(\"alert('" + message + "');\",0);"; system.web.ui.scriptmanager.registerstartupscript(this, this.gettype(), guid.newguid().tostring(), script, true); }
call method , pass message string
Comments
Post a Comment