i want to pass image after capture by webcam from one page to another page using c# web application and should be store in table in binary format...
image passing working fine from one page to another page while record save it occur error....image control is null. or path is incorrect..
what i have tried...
code for store image in binary format. string imageVisitor = Server.MapPath(visitorImg.ImageUrl); FileStream fs = new FileStream(imageVisitor, FileMode.Open, FileAccess.ReadWrite); BinaryReader br = new BinaryReader(fs); byte[] bytesImage = br.ReadBytes(Convert.ToInt32(fs.Length)); fs.Close(); br.Close(); cmd.Parameters.AddWithValue("@V_IMAGE", bytesImage);