Solved

CGI pages

Posted on 2000-03-19
11
171 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to dynamically set the form action using jQuery.

773 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