Display database resume to user
Im using upload control to upload my resume(word document) in sql server 2005 database.and i can download it from database when i click link button...Its all working file...My problem is how can i show my full resume to user (how to display my resume) fro开发者_JAVA技巧m my database?
You need to set the response contenttype header to the correct type and then send the file (I am assuming you have it as a byte array):
Response.Clear();
Response.ContentType = "application/pdf";
Response.BinaryWrite(fileBuffer);
Response.End();
You may also want to add a content-disposition header in order to let the user decide how to open the file:
// This goes after the clear and before the write
Response.AddHeader("content-disposition", string.Format("attachment; {0}", archivedFile.Name));
You may want users of your website to install these plugins which directly opens any document link in Google Docs Viewer. Might be that you can dig into these plugins and get a link so that you can redirect your users on that link and they will not have to install these plug ins
Firefox plug in and Google Chrome Plug In
精彩评论