Hello,
I want to call a javascript confirm in my else { } block. How should i do it ? I am using follwing code but is not giving me confirm box...also, how can i know if the user has clicked Yes or No? Please help me..
I am using the below code but it is not working....where am i going wrong? Also please let me know how to collect the response given by the user..
string script = "<script type="text/javascript">alert('Please note your New Password : " + password + "');</script>";
Page page = HttpContext.Current.CurrentHandler as Page;
if (page != null && !page.ClientScript.IsClientScriptBlockRegistered("alert"))
{
page.ClientScript.RegisterClientScriptBlock(typeof(MyPage), "alert", script);
}
Best Regards,
Rohan Laghate