Fire JavaScript from button inside GridView
<p>I have a GriView and implemented RowDataBound event like below</p>

<pre><code>  protected void gvwSearchResult_RowDataBound(object sender, GridViewRowEventArgs e)
    {
         if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int index = e.Row.RowIndex;
                string IdValue = gvwSearchResult.DataKeys[index].Value.ToString();
                Button _btnCheque = (Button)e.Row.FindControl("btnCheque");                  
               _btnCheque .OnClientClick = "&lt;script type='text/javascript'&gt;if(confirm('Do you want to continue?')){window.location='Cheque.aspx?ID=" + IdValue.ToString()+"';}&lt;/script&gt;";
            }

    }
</code></pre>

<p>When I click on button, there is a script error thrown. any idea on my script formatting?</p>
