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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download an ASP Page

Status
Not open for further replies.

ayladilara

Programmer
Apr 11, 2002
16
0
0
DE
How Can I download the dynamic content of ASP Page without exposing the ASP code? Before I print the same page on the client side , the code is not exposed.But when I download the same page the browser exposes the code.
 
well you said when I download the same page the browser exposes the code..

so when some client side error happpens due to bug in javascript, it will ask you to debug the application.
If you click Yes and if InterDev is installed on your PC, it will open the source code that is client side only.

It does not contain ASP code.Because ASP is used to generate client side code.

Well in other situation when you give physical path to the ASP file in your browser, it is not supposed to be understood by the browser so it will ask to download.
If browser is not able to execute the file from the server, it will ask for the permission to download it

Because here you are not calling an ASP page via IIS that is virtua directory like

Name

Got it ?? Rushi Shroff Rushi@emqube.com
"Life is beautiful."
 
Sorry, not quiet! I have been testing the project. I created the downloadable file after using FSObjet and formated the active data on the fly. Then as a client I print it, there is no problem,no ASP code on the browser. But when I download it as a client again I see the real ASP code sitting on the browser(view/source)!!!??? it is nothing to do with Visual Interdev. Of course this doesn'n make my life beautiful. Any insight will be greatly appreciated?


 
You're not being very clear ayladilara. When you say download...by the context you're using that word in, I can only guess that you mean to download it by viewing it in the browser like any web page...and when you're talking about being able to see the server-side code (ASP code), you are seeing it in the 'view source' option from the browser to view client side code.

If that is the case and you are seeing the server side code when you should only be seeing client side code by viewing the source from the browser, then my guess is you're not running .asp pages. You're probably running .inc into your pages which let's the client/user see the asp code.

If you want to stop that, change the .inc file to a .asp file. If this is not your problem, please be a little more descriptive. By saying downloading, generally one means to make a direct copy of a file or program from the server/other computer down to their own. By viewing a web page, while technically you are "downloading" it into your cache, or what-not, please don't refer to that as downloading the asp page as it will confuse many people...including myself...as to your true meaning. :)
-Ovatvvon :-Q
 
the first part of your guess is right. Sorry,the Second part isn't! Let me explain a little bit more clearly then. My ASP page is 'show_timesheet.asp'. When it is called by the search page.asp it displays the dynamic data on it then I pass the necessary variables and the name of the page(which is 'show_timesheet.asp') to 'the print.asp' through Query string. The Print.asp manipulates and formats the 'show_timesheet.asp' through FSObject and RegEx and prints it. Then when I want to download the same 'the printible page' I do like that:
"Response.AddHeader "Content-Disposition", "filename=" & page & ".htm". filename is a variable and points 'show_timesheet'. This pases the name as HTM or TxT format to the browser to be downloaded . If I print it as a clint no ASP code on the view/source. But when I download the same page and save it on the desktop , i could see the entire ASP code of 'show_timesheet.asp' on the view/source.Bizarre... It is obvious that the FsO read the entire ASP file... Sorry, a little bit repeat...

Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top