Solved

display alert box then redirect

Posted on 2009-05-12
6
446 Views
Last Modified: 2012-05-06
i have a

ClientScript.RegisterStartupScript(Me.GetType(), "AlertBox", "alert('Your request is completed.');", True)
resposne.redirect("")


i want the user to click ok in this box then redirect. but my page right now doesn't even stop for this to happen and just go straight to the redirect page. so how do i stop the page so that it allows users to click ok before it goes to redirect.
0
Comment
Question by:StewSupport
[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
6 Comments
 
LVL 2

Expert Comment

by:bootreboot
ID: 24368371
In VB.net the way to do it is

If MsgBox("message", MsgBoxStyle.OKOnly, "Title") = MsgBoxResult.OK Then
     resposne.redirect("")
End If

Open in new window

0
 

Author Comment

by:StewSupport
ID: 24368389
yeah but this is a web page. you can't use msgbox
0
 
LVL 7

Expert Comment

by:urir10
ID: 24368432
why not?
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 9

Accepted Solution

by:
tetorvik earned 500 total points
ID: 24368434
you can do it with javascript:

 ClientScript.RegisterStartupScript(Me.GetType(), "AlertBox", "alert('Your request is completed.');document.location='NewPage.aspx';", True)

Open in new window

0
 

Author Comment

by:StewSupport
ID: 24368482
the msgbox will work when you debugging it in vs studio but won't work when you host the site on your server.
0
 

Author Closing Comment

by:StewSupport
ID: 31580691
i didnt have document.location in my code. thanks.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

710 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