Solved

Popup box in asp.net 4.0 when a condition is met

Posted on 2010-11-10
5
478 Views
Last Modified: 2012-05-10
I would like to create a popupboxe when a condition is met in the codebehind. The condition is if the day they chose is a Sunday or not. I already have the conditional testing working I just need the popup. Thanks
0
Comment
Question by:mwhodges
  • 3
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Chad Smith
ID: 34102454
Response.Write("<script>alert('My Popup');</script>");
0
 

Author Comment

by:mwhodges
ID: 34102725
Is this for vb? the semicolon looks like a c# call.
0
 

Author Comment

by:mwhodges
ID: 34102782
I get the following error message when I try to run it:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed

0
 
LVL 10

Accepted Solution

by:
Chad Smith earned 500 total points
ID: 34103025
Yes it was for c# just remove the semicolon for vb
Response.Write ("<script>alert('My Popup');</script>")
0
 

Author Comment

by:mwhodges
ID: 34103052
I tried the code without the semicolon and I got the earlier error message.
0

Featured Post

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!

Join & Write a Comment

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…
jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
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…

746 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

14 Experts available now in Live!

Get 1:1 Help Now