allenbmeangene
New Member
I am trying to add a new line Javascript alert message. I tried '\n' and 'Environment.NewLine'. I am getting Unterminated string constant error. Could you please let me know what could be the problem? I appreciate any help. I also tried \r\n.\[code\]string msg = "Your session will expire in 10 minutes. \n Please save your work to avoid this.";if (!this.ClientScript.IsStartupScriptRegistered(ID)) this.ClientScript.RegisterStartupScript(GetType(), ID, String.Format("<script language=JavaScript>setTimeout(\'alert(\"{1}\");\',{0}*1000);</script>", sTime, msg));\[/code\]