Add apostrophe and other characters to attribute of Hyperlink Object in ASP.NET VB
<pre><code>Dim hyp = New HyperLink()
hyp.ID = a_taglist(itags)
hyp.Attributes.Add("onmousedown", "return clk('" &amp; a_taglist(itags) &amp; "')")
panel1.Controls.Add(hyp)
</code></pre>

<p>I want the row:</p>

<pre><code>hyp.Attributes.Add("onmousedown", "return clk('" &amp; a_taglist(itags) &amp; "')")
</code></pre>

<p>To add a onmousedown attribute to the hyperlink. </p>

<p>It kind of works but it gets replaced with <code>&amp; # 39</code>;</p>

<pre><code> onmousedown="return clk(&amp; #39;bavaria&amp; #39;)"
</code></pre>

<p>How can I avoid this.  I've tried to <code>"\"</code> escape it out and sending it <code>char(&amp;#39)</code> already.</p>

<p>Any ideas?</p>
