2

This is what I have tried

Page.Response.Clear();
Page.Response.ClearHeaders();
Page.Response.AddHeader("Content-disposition", "attachment; filename=" + "GraphExport.tsv");
Page.Response.AppendHeader("Content-type", "File/tsv");
Response.TransmitFile(FileName);
Response.End();

which is executed when a user clicks a download button. The code works fine. But my problem is this code seems to work perfectly if my application is an "asp.net web application" but not in "asp.net website".

Can some one point out what i am doing wrong and it would be great, if some one help me understand what is the diffrence between a web application and a website.

Bibhu
  • 4,053
  • 4
  • 33
  • 63
AMS
  • 550
  • 6
  • 22
  • Can you expand on "doesn't work"? – Simon Whitehead Sep 05 '13 at 05:57
  • i mean whwn i click on download button, i can see a file getting downloaded in "asp.net web application", but not in "asp.net website" and also i have tried on chrome nad IE, the problem is persistenet – AMS Sep 05 '13 at 06:03
  • I strongly recommend to not use web site "projects". They are unique within Visual Studio, and not in a good way. – John Saunders Sep 05 '13 at 06:04
  • hi jhon, thanks for the suggestion, the whole point why i am using website rather thanm a web application is because of ModalPopupExtender progress bar shown [here](http://weblogs.asp.net/guillermo/archive/2008/02/24/ajax-how-to-create-a-quot-processing-quot-modal-window-using-updateprogress-and-modalpopup-asp-net-ajax-controls.aspx), but to my suprise this things works perfectly fine in website but not in web application, for this reason i have to move to website because i needed to implement the progress bar. – AMS Sep 05 '13 at 06:16
  • Are you sure that it wont work at a web application ? I remember i used a progress bar in a web-app, but im not sure if it was inside a ModalPopUp ... – DatRid Sep 05 '13 at 13:54
  • There's nothing you can do in a web site that you can't do in a web application. If the progress bar isn't working in the web application, then you're doing something wrong. Ask a question here and we can help you. – John Saunders Sep 05 '13 at 14:15
  • i have tried it many times jhon, but still i have not able to implement it. but it works perfectly fine in website. here is my question in [stackoverflow](http://stackoverflow.com/questions/18631172/modalpopupextender-progress-bar-does-not-work-in-asp-net-web-application?noredirect=1#comment27428434_18631172) – AMS Sep 05 '13 at 15:10

0 Answers0