Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

display alert box then redirect

Posted on 2009-05-12
6
Medium Priority
?
453 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Accepted Solution

by:
tetorvik earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 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