protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"].ToString(); SqlCommand cmd = new SqlCommand("select photoName from registration where Id='" +id + "'", con); con.Open(); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { byte[] byteArr = (byte[])rdr["PhotoName"]; Response.BinaryWrite(byteArr); } rdr.Close(); con.Close(); }
<b> byte[] byteArr = (byte[])rdr["PhotoName"];</b>
byte[] byteArr = ((byte[])rdr["PhotoName"]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)