Solved

display alert box then redirect

Posted on 2009-05-12
6
434 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
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now