System.IO.Stream fs = fuImage.PostedFile.InputStream; System.IO.BinaryReader br = new System.IO.BinaryReader(fs); Byte[] bytes = br.ReadBytes((Int32)fs.Length); string base64String = Convert.ToBase64String(bytes, 0, bytes.Length); Image1.ImageUrl = base64String;
byte[] bytes = Encoding.ASCII.GetBytes(Dtab.Rows[0]["photo"].ToString()); MemoryStream ms = new MemoryStream(bytes); Image1.ImageUrl = Convert.ToBase64String(ms.ToArray(), 0, ms.ToArray().Length);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)