Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

CGI pages

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
Motaz
Asked:
Motaz
1 Solution
 
HamidHossainCommented:
Listening ...

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

Hamid
0
 
EpsylonCommented:
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
 
MotazAuthor Commented:
How can I do that in downloaded stream?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
geobulCommented:
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
 
MotazAuthor Commented:
I do not use PathInfo, I leave it empty, is there another way?
0
 
simonetCommented:
My suggestion is also that you use PathInfo.

Alex
0
 
MotazAuthor Commented:
I cann't use PathInfo, if I try to do so, I've to modify whole project (Mail Server)

Motaz
0
 
MotazAuthor Commented:
Hey...
0
 
cakkCommented:
try this:

Response.CustomHeaders.Add('Content-Disposition=; filename="Suggested Name.ext"');
0
 
MotazAuthor Commented:
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
 
MotazAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now