protected void Page_Load(object sender, EventArgs e) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["myconnection"].ConnectionString); string email = Session["email"].ToString(); string query = "select resumeData,resumeContent,resumeName from Employee where email='" + email + "'"; SqlCommand cmd = new SqlCommand(query, con); string strExtenstion=""; string strName = ""; UnicodeEncoding uniEncoding = new UnicodeEncoding(); con.Open(); SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.Default); if (dr.Read()) { byte[] imagecontent1 = (byte[])(dr["resumeData"]); int blen = ((byte[])dr["resumeData"]).Length; byte[] imagecontent = uniEncoding.GetBytes(imagecontent1.ToString().Replace("-","")); if (!dr["resumeContent"].Equals(System.DBNull.Value)) strExtenstion = dr["resumeContent"].ToString(); if (!dr["resumeName"].Equals(System.DBNull.Value)) strName = dr["resumeName"].ToString(); Response.Write("<pre>"); Response.BinaryWrite(imagecontent1); Response.Flush(); Response.Close(); Response.Write("<pre>"); } dr.Close(); con.Close(); }
<identity impersonate="true" />
web.config
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)