Click here to Skip to main content
14,389,022 members
Rate this:
Please Sign up or sign in to vote.
See more:
How to download Word file in asp.net with internet explorer and google crome ?
i have made a one application this application is successful run with Mozilla Firefox but don't run with internet explorer and google chrome.
Posted
Comments
Jeffrey Enzo 15-Apr-11 2:41am
   
Provide more information, such as your errors in IE and Chrome
Pratham4950 15-Apr-11 5:29am
   
No, nothing error, just blank display....
Pratham4950 15-Apr-11 6:04am
   
i have made a simple download Microsoft word 2007 files application. when user click the button then download the word file. This application in Mozilla Firefox is completely work but it is not work in internet explorer and Google chrome.
m@dhu 15-Apr-11 2:42am
   
not clear.
Pratham4950 15-Apr-11 5:36am
   
i have made a simple download Microsoft word 2007 files application.
when user click the button then download the word file.
This application in Mozilla Firefox is completely work but it is not work in internet explorer and Google chrome.
Sandeep Mewara 15-Apr-11 4:29am
   
Not clear at all. What are your trying to do? sounds like some code is not compatible with IE & Chrome. Care to elaborate and share?
Pratham4950 15-Apr-11 5:36am
   
i have made a simple download Microsoft word 2007 files application.
when user click the button then download the word file.
This application in Mozilla Firefox is completely work but it is not work in internet explorer and Google chrome.
Sandeep Mewara 15-Apr-11 5:52am
   
You should update your question with code such that one can tell if it has to do something with browsers and why it is so.
Pratham4950 15-Apr-11 6:12am
   
protected void btnword_Click(object sender, EventArgs e)
{
Response.Redirect("Downloads/222.docx");
}
Sandeep Mewara 15-Apr-11 6:45am
   
Looks like a URL formed issue. Are you sure that the path is correct?
Tried to debug and see?
Pratham4950 15-Apr-11 6:58am
   
yes, this application is completely run with Mozilla Firefox without any issue.
just not download in internet explorer and Google chrome.
Sandeep Mewara 15-Apr-11 7:58am
   
Yes thats Ok but there needs to more for sure. How the request was made and if anything else was made, etc. For now, with no info on any error, it's hard to comment then.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Have a look at this link that shows how to force the "Save as..." dialog. The reason that the file isn't downloading is because it is a known file type and opened with the registered handler for that type.
http://www.haiders.net/post/Force-File-Download-with-ASPNET.aspx[^]

Good luck!
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100