I have the following in my aspx.
<html>
<body>
<input id="but" type="button" value="ClickMe" />
</body>
</html>
Code behind
//Pageload
but.Attributes.Add("onclick", "this.parentNode.innerHTML += '<a id=""link"" href=""mylink""></a>';document.getElementById(""link"").click();");
Rendered html
<input name="ctl00$Content$btn" type="button" id="ctl00_Content_btn" value="ClickMe"
onclick="this.parentNode.innerHTML += '<a id="link" href="mylink"></a>';document.getElementById("link").click();" />
How can I get the < > " characters to render properly?