File Extention and IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard

    #1

    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.


  • Crouchie1998

    #2
    Re: File Extention and IE

    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:

    Free software components for C#, VB.NET and other .NET languages.


    I hope this helps

    Crouchie1998
    BA (HONS) MCP MCSE


    Comment

    • Richard

      #3
      Re: File Extention and IE

      I have already done that(FileAssoci ation). 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.

      "Crouchie19 98" <crouchie1998@s pamcop.net> wrote in message
      news:OM1N7GwWFH A.3044@TK2MSFTN GP10.phx.gbl...[color=blue]
      > 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
      >
      >[/color]


      Comment

      • BW

        #4
        Re: File Extention and IE

        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" <Richard@nospam .com> wrote in message
        news:%23XP81gwW FHA.2520@TK2MSF TNGP09.phx.gbl. ..[color=blue]
        > I have already done that(FileAssoci ation). When I double click the file it
        > opens fine. But when I put it in html, IE doesn't recognise it. It tries[/color]
        to[color=blue]
        > open it as html page, instead of downloading it.
        >
        > Richard.
        >
        > "Crouchie19 98" <crouchie1998@s pamcop.net> wrote in message
        > news:OM1N7GwWFH A.3044@TK2MSFTN GP10.phx.gbl...[color=green]
        > > 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
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • dave bray

          #5
          Re: File Extention and IE

          most reliable way is something like this;

          Set oStream = Server.CreateOb ject("ADODB.Str eam")
          oStream.Open
          oStream.Type = 1 ' Binary
          oStream.LoadFro mFile strPath ' strPath is path to file
          binaryData = oStream.Read ' file is not in var
          Set oStream = Nothing

          Response.AddHea der "content-disposition", _
          "attachment ; filename=""" & strFileName & """"
          Response.Binary Write binaryData



          Richard wrote:[color=blue]
          > 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.
          >
          >[/color]

          Comment

          Working...