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
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