Solved

Yes or No Messagebox in ASP.NET (vb)

Posted on 2011-09-28
5
471 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
  • 3
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery on Submit 4 46
Server Shares and Excel files 2 13
ASP.NET MVC - Views 3 22
send email part1 9 28
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
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)

820 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