Cannot trigger the ASP.NET page

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.
 
V

Veronica Jacobs

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top