Incorrect syntax near '=' ... Error in .ashx file
<p>I am trying to retrieve an image from database &amp; showing it to gridview.But It shows the  Error in .ashx file that</p>

<pre><code>SqlCommand command = new SqlCommand(
    "select Image from ImageStore where ImageID=" + imageid, connection); 
SqlDataReader dr = command.ExecuteReader(); dr.Read(); 
context.Response.BinaryWrite((Byte[])dr[0]);
</code></pre>

<blockquote>
  <p>Incorrect syntax near '=' </p>
</blockquote>

<p>How to solve it</p>
