?
Solved

Yes or No Messagebox in ASP.NET (vb)

Posted on 2011-09-28
5
Medium Priority
?
488 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

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.
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

771 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