Solved

CGI pages

Posted on 2000-03-19
11
173 Views
Last Modified: 2013-11-18
When I produce an HTML pages using CGI application, and the user want to save this document, the default file name will be the name of Executable CGI, so how can I assign a name to that page?

Also that problem appear when I download a file using Response.ContentStream, the default name of downloaded file is the name of my CGI.

Is there any way to change that default name?

Motaz
0
Comment
Question by:Motaz
11 Comments
 

Expert Comment

by:HamidHossain
ID: 2635133
Listening ...

I have no Idea Motas,  I think you should change it manually.

Hamid
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2635136
Add something like this in the content:

<head>
<title>The title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
......
0
 
LVL 7

Author Comment

by:Motaz
ID: 2635183
How can I do that in downloaded stream?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 17

Expert Comment

by:geobul
ID: 2635290
Hi Motaz,

  Actually default name is the string after last slash '/'.
  You can set path after the CGI script name like:
  'http://.../ScriptName.exe/motaz'
  In this case the default save name will be 'motaz.html'.

  This path info is used for different web action items in CGI script. If you use default action only, you can use the described way above.

Regards, Geo
0
 
LVL 7

Author Comment

by:Motaz
ID: 2635353
I do not use PathInfo, I leave it empty, is there another way?
0
 
LVL 15

Expert Comment

by:simonet
ID: 2635598
My suggestion is also that you use PathInfo.

Alex
0
 
LVL 7

Author Comment

by:Motaz
ID: 2635624
I cann't use PathInfo, if I try to do so, I've to modify whole project (Mail Server)

Motaz
0
 
LVL 7

Author Comment

by:Motaz
ID: 2643795
Hey...
0
 

Accepted Solution

by:
cakk earned 50 total points
ID: 2644348
try this:

Response.CustomHeaders.Add('Content-Disposition=; filename="Suggested Name.ext"');
0
 
LVL 7

Author Comment

by:Motaz
ID: 2644499
cakk, it didn't work, it displays random letters instead of the name I was suggested, but I think the solution is around that CustomHeader!

Motaz
0
 
LVL 7

Author Comment

by:Motaz
ID: 2644543
IT WORKS Cakk!!!

Thanks very much, but without Double-Quate ("):

'Content-Disposition=; filename=MyFile.ext');

Thanks very mush. If I have more points I could give it to you, but unfortunately I haven't

Motaz
www.geocities.com/motaz1
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question