Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can I call clientside popup alert programatically with ASP.NET?

Posted on 2009-07-15
2
Medium Priority
?
560 Views
Last Modified: 2013-11-08
I want to display a popup box programatically in an asp.net timer event function.  I can't use the native msgbox function as it won't work on the live webserver so was thinking of calling a javascript function with an alert box.  The javacript function is already in place I just need to call it but I don't know how to do this from the serverside code without triggering an event.  Is there any way I can trigger a button click event or something programatically to call the javascript function?  Basically my timer tick function runs in the background and at the Tick event it should display the popup if certain conditions are met as outlined in the Tick function.

Any help appreciated.  Thanks.

P.S.  Response.Write("<script language='javascript'>alert('hello');</script>") doesn't work for me.
0
Comment
Question by:alankinane
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
prairiedog earned 2000 total points
ID: 24863611
Try this:

ScriptManager.RegisterStartupScript(Me, Me.GetType(), "alertbox", "alert('Timer.');", True)

Open in new window

0
 

Author Closing Comment

by:alankinane
ID: 31603907
Thank-you very much, it was as simple as that!
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

722 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