开发者

Display database resume to user

开发者 https://www.devze.com 2022-12-29 22:49 出处:网络
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 sho

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号