I have the following lines of code from .ashx file.
public void ProcessRequest (HttpContext context)
{
string hstr = @"Data Source=SUMAN-PC\SQLEXPRESS;Initial Catalog=school;Integrated Security=True";
SqlConnection con = new SqlConnection(hstr);
string ms = context.Request.QueryString["id_image"].ToString();
con.Open();
SqlCommand cmd = new SqlCommand("select img from class where classid=" + ms, con);
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
context.Response.BinaryWrite((Byte[])dr[0]);
context.Response.End();
}
After some study i found this
"The BinaryWrite method sends specific data to the current HTTP output without any character conversions."
What does it mean? How does it send data to http output? Where is HTTP output?