Retrive image from database and open in new page using asp.net MemoryStream mstream = new MemoryStream(); SqlConnection conn = new SqlConnection("Data Source=(local)\\sqlexpress;Initial Catalog=master;Integrated Security=True"); conn.Open(); SqlCommand cmd = new SqlCommand("select Image from student1 where Id=" + TextBox1.Text, conn); byte[] image = (byte[])cmd.ExecuteScalar(); mstream.Write(image, 0, image.Length); Bitmap bitmap = new Bitmap(mstream); Response.ContentType = "image/gif"; bitmap.Save(Response.OutputStream, ImageFormat.Gif); conn.Close(); mstream.Close();
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.