Solved

CGI pages

Posted on 2000-03-19
11
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

737 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