Monday, 18 May 2015
Watch this example on YouTube:
Replace
namespace WebApplication1
{
public partial class JavaScriptPopup : System.Web.UI.Page
{
private void PopupMessage(string Message)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "ServerMessage", "javascript:alert('" +
Message + "');", true);
}
protected void Page_Load(object sender, EventArgs e)
{
PopupMessage("first line \\n second line");
}
}
}
With
namespace WebApplication1
{
public partial class JavaScriptPopup : System.Web.UI.Page
{
private void PopupMessage(string Message)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "ServerMessage", "javascript:alert('" +
Message + "');", true);
}
protected void Page_Load(object sender, EventArgs e)
{
PopupMessage("first line \\n second line");
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment