Opening a chm file from the web application

S

sunil

Hi all,
I have a web application in which I have to open a "chm" file that
exists on the local file system. I am able to open other files such as
PDF, DOC files by writing the Response's output stream.
But I do not exactly know the Response.ContentType for chm files.
I have used the following code to handle the case for chm files

System.IO.StreamReader sr = new System.IO.StreamReader(this.Path);
FileInfo file = new FileInfo(this.Path);
Response.Clear();
Response.ContentType = "application/vnd.ms-htmlhelp";
Response.WriteFile(file.FullName);
sr.Close();

But this is not opening the document.
Any help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top