[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Yes or No Messagebox in ASP.NET (vb)

Posted on 2011-09-28
5
Medium Priority
?
495 Views
Last Modified: 2012-05-12
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
Comment
Question by:pvg1975
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 36720475
<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
 
LVL 82

Expert Comment

by:leakim971
ID: 36720478
more infos (Confirm box) : http://www.w3schools.com/js/js_popup.asp
0
 

Author Comment

by:pvg1975
ID: 36720492
Hey Leak! How are you?

And how can I call that script when the user clicks on an image?! Sorry Im so basic... :(
0
 

Author Closing Comment

by:pvg1975
ID: 36720508
NEver mind, I got it. What a shame that the text of the buttons cannot be changed. Thanks Leak!
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36720559
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

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question