Link to home
Start Free TrialLog in
Avatar of StewSupport
StewSupport

asked on

display alert box then redirect

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.
Avatar of bootreboot
bootreboot

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

Avatar of StewSupport

ASKER

yeah but this is a web page. you can't use msgbox
why not?
ASKER CERTIFIED SOLUTION
Avatar of tetorvik
tetorvik
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the msgbox will work when you debugging it in vs studio but won't work when you host the site on your server.
i didnt have document.location in my code. thanks.