I have my files stored as bytes in my database.
How to open files like this with its application (like microsoft office, acrobat reader ,...etc) or download it.
I want to do this with generic handler
:
public class Attachement : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
try
{
byte[] Attachement = (byte[])AttachementDAL.ReadAttachement(int.Parse(context.Session["attch_serial"].ToString())).Rows[0]["attach_content"];
}
catch (Exception ee)
{
}
}
public bool IsReusable
{
get
{
return false;
}
}