Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

Yes or No Messagebox in ASP.NET (vb)

Hello all,

I need to display a message box with the Yes or No buttons and the legend "Are you a current user?" on it when the user clicks on an image.

If the user click on Yes I need to redirect the page to LOGIN.ASPX and if the user clicks on NO I need to redirect to SIGNUP.ASPX.

Can this be done with JavaScript?

Thanks!

Paula.
0
pvg1975
Asked:
pvg1975
  • 3
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
<script language="javascript" type="text/javascript">
if( confirm("Are you a current user?") ) {
   location.href = "/path/to/LOGIN.ASPX";
}
else {
   location.href = "/path/to/SIGNUP.ASPX";
}
</script>

Open in new window

0
 
leakim971PluritechnicianCommented:
more infos (Confirm box) : http://www.w3schools.com/js/js_popup.asp
0
 
pvg1975Author Commented:
Hey Leak! How are you?

And how can I call that script when the user clicks on an image?! Sorry Im so basic... :(
0
 
pvg1975Author Commented:
NEver mind, I got it. What a shame that the text of the buttons cannot be changed. Thanks Leak!
0
 
leakim971PluritechnicianCommented:
Hi pvg1975,

I'm fine, thanks?
yes the text can't be replaced for security purpose
for example a coder may invert the labels and cause some troubles to the users

see you soon
Regards
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now