public void ProcessRequest(HttpContext context)
{
SqlConnection cn = new SqlConnection("Data Source=PRAVIN-PC;Initial Catalog=sales;Integrated Security=True");
cn.Open();
string id1 =context.Request.QueryString["id"].ToString ();
SqlCommand cmd = new SqlCommand("SELECT [image] FROM [image] where id =" + id1, cn);
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
context.Response.BinaryWrite((byte[])dr[image]);
dr.Close();
cn.Close();
}
This is my coding.. am getting error in highlighted line and throws exception error as
"Null reference exception was unhandled by user code.
Object reference not set to an instance of an object. "
pls provide a solution...