473,322 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

File Extention and IE

Hi Gurus,
I have a file with extention abc.
I want to create a html page. When user click a link it should open that
file, but IE does not recognise that file(.abc).
What I have to do so that when user click's it it should download it as EXE
or other files.

Please help.
Richard.
Nov 21 '05 #1
4 1085
You need to register your file extension. You can either do it via the link
below or using the Setup program to do the work for you

Try this:

http://www.mentalis.org/soft/class.qpx?id=5

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
I have already done that(FileAssociation). When I double click the file it
opens fine. But when I put it in html, IE doesn't recognise it. It tries to
open it as html page, instead of downloading it.

Richard.

"Crouchie1998" <cr**********@spamcop.net> wrote in message
news:OM**************@TK2MSFTNGP10.phx.gbl...
You need to register your file extension. You can either do it via the
link
below or using the Setup program to do the work for you

Try this:

http://www.mentalis.org/soft/class.qpx?id=5

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE

Nov 21 '05 #3
BW
Is this on a web server? Or a file system?

If webserver...

Doing the fileassociation is not going to help. You need to tell IIS how to
server the file/page.

You do this by adding a mapping properties dialog on IIS or you can
implement either IHttpHandler or IHttpModule in your web application.

HTH
B

"Richard" <Ri*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have already done that(FileAssociation). When I double click the file it
opens fine. But when I put it in html, IE doesn't recognise it. It tries to open it as html page, instead of downloading it.

Richard.

"Crouchie1998" <cr**********@spamcop.net> wrote in message
news:OM**************@TK2MSFTNGP10.phx.gbl...
You need to register your file extension. You can either do it via the
link
below or using the Setup program to do the work for you

Try this:

http://www.mentalis.org/soft/class.qpx?id=5

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE


Nov 21 '05 #4
most reliable way is something like this;

Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1 ' Binary
oStream.LoadFromFile strPath ' strPath is path to file
binaryData = oStream.Read ' file is not in var
Set oStream = Nothing

Response.AddHeader "content-disposition", _
"attachment; filename=""" & strFileName & """"
Response.BinaryWrite binaryData

Richard wrote:
Hi Gurus,
I have a file with extention abc.
I want to create a html page. When user click a link it should open that
file, but IE does not recognise that file(.abc).
What I have to do so that when user click's it it should download it as EXE
or other files.

Please help.
Richard.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Kim Jensen | last post by:
I'd like to make a directory listing where instead of the entire filename I need it to show the filename minus the extention and get the value of charname= in the file itself. I've been told...
2
by: Keith | last post by:
Is it possible to rename a file which a user uploads to the server? I have a form which allows users to upload an image to a folder on the web server. This works fine. The form they submit...
2
by: Mo | last post by:
Hi all, I hope that someone out there can help me with a problem I have been having. I have just finished creating a website and have added a header to most of the pages on my site. The header...
6
by: JD | last post by:
Hi all, Can anyone tell me is there a way to get a list of file types either supported on the server or clients computer and bind it to a drop down list in C# Thanks Jonathan Dixon
2
by: ghighi | last post by:
Hello, Il a downloading a file from a download.aspx page with that code: ----------------------------------------------------------------------------------------- string fileName =...
6
by: PipedreamerGrey | last post by:
I'm using the script below (originally from http://effbot.org, given to me here) to open all of the text files in a directory and its subdirectories and combine them into one Rich text file...
17
by: Peter Duniho | last post by:
I searched using Google, on the web and in the newsgroups, and found nothing on this topic. Hopefully that means I just don't understand what I'm supposed to be doing here. :) The problem: ...
5
by: Krustov | last post by:
I have the following list of image files . When searching the latest (numbered file) in this particular case its background_4.*** and its a .jpg file - but - the latest file in the list could...
10
by: shaiful | last post by:
Hi all I have a problem with extention of file. such as: Dim s, s1 As String s = "Test.doc" i want get the value of s is in s1 as "Test.txt" such as : s1 = "Test.txt" so, how i can get...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.