Cannot trigger the ASP.NET page

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I have the following code statement

btnDelete.Attributes.Add("onclick", "if (confirm('Confirm to remove this User Account ?')) document.location.href='DeleteUserAccDetail.aspx;'");

Why can't I trigger the DeleteUserAccDetail.aspx page when I choose YES from the confirmation alert box??


Million thanks.
 
You've got the semi-colon after DeleteUserAccDetail.aspx inside the single tick (') and it should be to the right of it. You're probably just getting a client-side script error instead of a redirect.

- V.J.
EncryptaSoft
www.encryptasoft.com

I have the following code statement

btnDelete.Attributes.Add("onclick", "if (confirm('Confirm to remove this User Account ?')) document.location.href='DeleteUserAccDetail.aspx;'");

Why can't I trigger the DeleteUserAccDetail.aspx page when I choose YES from the confirmation alert box??


Million thanks.
 
Back
Top