Hi all,
I'm having an issue creating a link like "<a href="javascript:window.open('www.microsoft.com');">Visit Microsoft</a>
using stringbuilder. I am adding html to a panel dynamically and I am trying to create a popup link.
The problem is that for some reason the link gets "mixed up". For example:
Dim s As String
sb.Append("<A HREF='javascript:void(0)' onclick='window.open(")
sb.Append("'")
sb.Append("Match.aspx?MatchID=")
sb.Append(mt.MatchID)
sb.Append("&batchid=")
sb.Append(mb.batchID)
sb.Append("')>")
sb.Append("Match</A>")
gives an output of :
<a match.aspx?matchid="28840&batchid=26596')" onclick="window.open(" href="javascript:void(0)">Match</a>
I have no clue what I'm doing wrong, it even does this kind of crap for a regular string!
Please help!