How to escape special chars inside a Page.ClientScript.RegisterStartupScript alert

This is my code:

Page.ClientScript.RegisterStartupScript(Page.GetType(), "ko", "alert('questa l'unica attiva');", true);

but on client I got the SyntaxError: missing ) after argument list error message near the ' char. How do I escape it?


Source: .net

Leave a Reply