title: Yii Ajax request CSRF can not be verified
body: <p>I use a few different AJAX calls in one of my pages through a couple of different methods.</p>
  
  <ol>
  <li><code>CHtml::link()</code></li>
  <li><code>CHtml::ajax()</code></li>
  <li>Within <code>CGridview</code></li>
  </ol>
  
  <p>Since enabling CSRF I'm having difficulty verifying the token. What is the correct way? I've read a few posts, but struggling to implement. For instance in <code>CHtml::link()</code> I've tried:</p>
  
  <pre><code>'data' =&gt; "Yii::app()-&gt;request-&gt;csrfTokenName = Yii::app()-&gt;request-&gt;csrfToken",
  </code></pre>
  
  <p>and also within <code>CGridview</code>:</p>
  
  <pre><code>data: {
      Yii::app()-&gt;request-&gt;csrfTokenName =&gt; Yii::app()-&gt;request-&gt;csrfToken
  },
  </code></pre>