I am trying to retrieve an image from database & showing it to gridview.But It shows the Error in .ashx file that
SqlCommand command = new SqlCommand(
"select Image from ImageStore where ImageID=" + imageid, connection);
SqlDataReader dr = command.ExecuteReader(); dr.Read();
context.Response.BinaryWrite((Byte[])dr[0]);
Incorrect syntax near ‘=’
How to solve it
Do something like this: