Results 1 to 2 of 2

Thread: Making a link to an MP3 file prompt a user to download?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    3

    Making a link to an MP3 file prompt a user to download?

    I want to have a download button for users to download an MP3 file. When I click a link to the mp3 file it just opens in Windows Media Player automatically. Is there a way that I can make it prompt the user with the Save dialog (Like when you right click a link and choose save target as)

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Making a link to an MP3 file prompt a user to download?

    Do you have a specific adress to this mp3 file?

    in that case you could do something like (just assuming youre using VB 2005):
    VB Code:
    1. If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
    2.         my.Computer.Network.DownloadFile(AdressToFile, SaveFileDialog1.FileName)
    3.         process.Start(SaveFileDialog1.FileName)
    4. End If
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width