954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

displaying an alert message in event handler

hi...
i want to display an alert message when the timer.tick even occurs....

protected void Timer2_Tick(object sender, EventArgs e)
        {
            Timer1.Enabled = false;
            System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=\"JavaScript\">alert(\"30 Seconds up. Exporting to Library\")</SCRIPT>");
            Response.Write("<script language=javascript>alert('30 Seconds up. Exporting to Library');</script>");
            ClientScript.RegisterStartupScript(this.GetType(), "MyKey", "alert('30 Seconds up. Exporting to Library ');", true);
            ClientScript.RegisterClientScriptBlock(this.GetType(), "MyKey", "alert('30 Seconds up. Exporting to Library ');", true);
        }


The above is what i've tried so far...
none of the above give out an alert message....
i think it's because there is no response happening during the event...
how do i force the page to throw an alert.....

arjunpk
Light Poster
46 posts since Jan 2011
Reputation Points: 4
Solved Threads: 2
 

If i'm right...
i have to force a postback for the alert message to show up...
how do i do it....

arjunpk
Light Poster
46 posts since Jan 2011
Reputation Points: 4
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: