Solved

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

Posted on 2010-11-10
5
485 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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