title: Passing parameter value through a function from anchor tag in a gridview
body: <p>I have a <code>GridView</code>, within which I have an anchor tag. In the anchor's <code>onclick</code> I am calling a function and passing some parameters. I am getting an error "server tag is not well formed".</p>
  
  <pre><code>&lt;asp:GridView runat="server" ID="GridView1"&gt;
  
   &lt;asp:TemplateField&gt;
  
   &lt;ItemTemplate&gt;
  
   &lt;div id="div1" runat="server" &gt;
  
    &lt;a onclick="rateDocument('&lt;%#Eval("FileRef")%&gt;','&lt;%#Eval("ListId")%&gt;',&lt;%#Eval("ID")%&gt;,2)" class=""&gt;    
  
    &lt;/a&gt;
  
   &lt;/div&gt;
  
   &lt;/ItemTemplate&gt;
  
  &lt;/asp:TemplateField&gt;
  
  &lt;/asp:GridView&gt;
  
  
  function rateDocument(documentWebURL,rtListId, rtItemId, currentRating) 
  {
  
  }
  </code></pre>
  
  <p>However,If the values are hard-coded (as below) then it works without error.</p>
  
  <pre><code>&lt;a runat="server" onclick="rateDocument('sites/SI/IBX/','{A1AF-12FA92C6F8CD}',113,1)" class=""&gt;                          
  </code></pre>