1
實際上,我需要顯示Success Message
,並且在點擊OK
之後,它應該將Redirect
me轉換爲另一個Page
。
Upto Now,Everything works fine.But放置UpdatePanel
後,Alert
未顯示。無法使用ClientScript.RegisterStartupScript在UpdatePanel中顯示警報
我的代碼:
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>");
我試着用:
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>",true);
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>",false);
但是,這些都不工作:(
工程就像一個魅力: ) – RealSteel