title: how to call javascript function from client side on anchor click
body: <p>I have javascript function sample('textValue') and have to call at server side on anchor click. I tried below code</p>
  
  <pre><code>string text="xyz";
  anchor.Attributes.Add("onclick","javascript:sample('"+text+"');
  </code></pre>
  
  <p>but the value of the text is not assigning correctly. Encoded string gets added. The result in view source looks like</p>
  
  <pre><code>javascript:sample(&amp;#39;xyz&amp;#39;)
  </code></pre>
  
  <p>But i need javascript:sample('xyz')</p>