Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to open word file in my asp.net website which is saved in sqlserver database in binary format. please give me suggestion how can i open??????
Posted
Updated 18-Apr-14 22:32pm
v2
Comments
ZurdoDev 18-Apr-14 10:32am    
Depends on what you mean.

USING JAVASCRIPT

XML
<script type="text/javascript" language="JavaScript">
function OpenWord(strFile)
{
var myApp = new ActiveXObject("Word.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>
</body>



USING ASP.NET

http://aspsnippets.com/Articles/Display-Word-document-on-web-page-in-ASP.Net.aspx[^]


Regards,
Praveen Nelge
 
Share this answer
 
Comments
SYED SHAHID ALI 19-Apr-14 4:30am    
sir my word file is saved in sqlserver database in binary format
you should try this.

C#
protected void btnOpen_Click(object sender, EventArgs e)
{
Response.Redirect("Yourdoc.pdf");
}
 
Share this answer
 
Comments
SYED SHAHID ALI 19-Apr-14 3:31am    
sir it will work for only pdf file

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900