I am trying to get this to work. If I drop a literal on an ASPX page in my project and then on the click of a button I run some code then I write to the literal javscript alert text, it works perfect. However, on this one page I have a control and on that ASCX control I have the same literal. Also on this control is an AJA update panel but the literal is outside the update panel itself. When I write to the literal in my code behind the alert never comes up and it is not showing in the source. Any idea what may be the issue?
private void SayScriptAlert(string message)
// Format string properly
message = message.Replace("'", "\'");
message = message.Replace(Convert.ToChar(10), '\n');
message = message.Replace(Convert.ToString(13), "");
ltlAlert.Text = "<script>alert('" + message + "');</script>";