Sunday, 25 August 2013

Unable to show Alert with ClientScript.RegisterStartupScript when placed in UpdatePanel

Unable to show Alert with ClientScript.RegisterStartupScript when placed
in UpdatePanel

Actually,I need to show Success Message and after Clicking OK,It should
Redirect me to another Page.
Upto Now,Everything works fine.But after placing UpdatePanel,the Alert is
not Showing.
My Code :
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table",
"<script language='JavaScript'>alert('Time Table Created Successfully.');
window.location.href = 'create.aspx';</script>");
I tried with :
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);
But,none of these worked :(

No comments:

Post a Comment