[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CGI pages

Posted on 2000-03-19
11
Medium Priority
?
179 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
Technology Partners: 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 200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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.
Suggested Courses

864 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