pratikshahse
asked on
Alert message
I need to have pop up message inside an if statement.
If false
Pop Up (only "ok" button)
end if
Once user clicks ok the code should continue with what its suppose to do next.
this is for asp.net with VB.net code.
If false
Pop Up (only "ok" button)
end if
Once user clicks ok the code should continue with what its suppose to do next.
this is for asp.net with VB.net code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can show a popup on client side but your second requirement to continue code execution after the popup can not be met in ASP.NET. In ASP.NET, code has to complete execution, response has to be sent to the client and then popup can be shown on client side.
The register startup script will flag that the popup needs to show, but CC is correct, there's no way to go back and forth between server and client.
can u make a try like this
if (false)
Response.Write("<script>alert('Condition is False...');</script>")
end if
It's VB#? Use "Then" or remove "end if". You can use 'fake' page with alert only and Response/Server.Redirect conditionally.
if (false) Response.Redirect("dummy.h tml");
'dummy.html
<script>alert('whatever'); document.l ocation.hr ef='realPa ge.asp?fro mDummy=1'; </script>
if (false) Response.Redirect("dummy.h
'dummy.html
<script>alert('whatever');