Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Download is downloading aspx page itself - Help, Urgent!!!

Status
Not open for further replies.

lpatnaik

Programmer
Jul 11, 2002
53
I am generating certain excel and word files dynamically by calling a vb component from my aspx page. now after geenrating that document, the file name is displayed in an aspx page as a link, so that on clicking it, a person can either open or save the file. Since this is a dynamically generated file, i have to do this downloading scheme when the user clicks on the file link.
To do this presently on the onclick event of the file link, i am submitting the page to the server through form.submit and there i am doing the adding of the content type header and writing out the contents. This works fine sometimes but other times, it tries to dowbnload the aspx file itself within which the code exists rather than downloading the downloadble file contents. Can anyone help me out. This is URGENT
 
Seems like to have a time problem. If I understand correctly, it works sometimes (the file generated is small) and sometimes it doesn't (file generated is bigger and needs to wait more time)

Could this be your problem? Once we define correctly what the problem is we can find the best solution...

hth Daren J. Lahey
Just another computer guy...
If you are unsure of forum etiquette check here FAQ796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top