By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Download vs. play?

P: n/a

Hi!

this may be a trivial question, and may not even involve asp, but let me
try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player and
tries to play the file there. Any ideas?

Thanx in advance.
--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
www.keeninc.net
www.icinema.com
Jul 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...

Hi!

this may be a trivial question, and may not even involve asp, but let me
try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player and
tries to play the file there. Any ideas?

Thanx in advance.
--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
www.keeninc.net
www.icinema.com


You're right - it doesn't involve ASP. Put an instruction on your web page
for visitors to right-click on the link to the .wmv file and "save target
as..."
Jul 21 '05 #2

P: n/a
Hi Anil,

You can "force-feed" the file back to the browser as described here.
http://www.aspfaq.com/show.asp?id=2161

Ray at home

"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...
I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player and
tries to play the file there. Any ideas?

Jul 21 '05 #3

P: n/a
Paxton wrote on 07 nov 2004 in microsoft.public.inetserver.asp.general:
"Anil Gupte" <an*******@maxnetwork.com> wrote in message
this may be a trivial question, and may not even involve asp, but let
me try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player
and tries to play the file there. Any ideas?


You're right - it doesn't involve ASP. Put an instruction on your web
page for visitors to right-click on the link to the .wmv file and
"save target as..."


Oh, but it can be done with ASP. Use as mime type:

Response.ContentType = "application/asp-unknown"

<http://www.google.com/search?q=ADODB+ASP+force.download>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #4

P: n/a

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Paxton wrote on 07 nov 2004 in microsoft.public.inetserver.asp.general:
"Anil Gupte" <an*******@maxnetwork.com> wrote in message
this may be a trivial question, and may not even involve asp, but let
me try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player
and tries to play the file there. Any ideas?


You're right - it doesn't involve ASP. Put an instruction on your web
page for visitors to right-click on the link to the .wmv file and
"save target as..."


Oh, but it can be done with ASP. Use as mime type:

Response.ContentType = "application/asp-unknown"

<http://www.google.com/search?q=ADODB+ASP+force.download>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


<!--Has now added a new bookmark :D-->
Jul 21 '05 #5

P: n/a
Fantastic! I am sure with all these resources, I can find one that works
for me. Thanx all!

--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
an*******@keeninc.net
www.keeninc.net
www.icinema.com
"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...

Hi!

this may be a trivial question, and may not even involve asp, but let me
try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player and
tries to play the file there. Any ideas?

Thanx in advance.
--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
www.keeninc.net
www.icinema.com

Jul 21 '05 #6

P: n/a
OK, I failed. Can someone tell me what is going wrong in this code?

<%
Response.Buffer = False
Server.ScriptTimeout = 30000

Response.ContentType = "application/x-unknown" ' arbitrary
fn = "raigarh.wmv"
FPath = "e:\icinema.com\movies\raigarh\" & fn
Response.AddHeader "Content-Disposition", "attachment; filename=" & fn

Set adoStream = CreateObject("ADODB.Stream")
chunk = 2048
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)

iSz = adoStream.Size

Response.AddHeader "Content-Length", iSz

For i = 1 To iSz \ chunk
If Not Response.IsClientConnected Then Exit For
Response.BinaryWrite adoStream.Read(chunk)
Next

If iSz Mod chunk > 0 Then
If Response.IsClientConnected Then
Response.BinaryWrite objStream.Read(iSz Mod chunk)
End If
End If

adoStream.Close
Set adoStream = Nothing

Response.End
%>

I copied this from http://www.aspfaq.com/show.asp?id=2161 and saved it to a
file called download.asp However, when I click on the link to Download.asp,
it says it "cannot download download.asp". On Windows XP I do not get even
that, just a page cannot be displayed message.

Please help, I am desperate now!

Thanx,
--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
an*******@keeninc.net
www.keeninc.net
www.icinema.com
"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:ev*************@TK2MSFTNGP11.phx.gbl...
Fantastic! I am sure with all these resources, I can find one that works
for me. Thanx all!

--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
an*******@keeninc.net
www.keeninc.net
www.icinema.com
"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...

Hi!

this may be a trivial question, and may not even involve asp, but let me
try....

I want people to click on a .wmv file on a website and download it.
Currently, when they do that it simply launches windows media player and
tries to play the file there. Any ideas?

Thanx in advance.
--
Anil Gupte
k.e.e.n., inc.
Milwaukee, WI
www.keeninc.net
www.icinema.com


Jul 21 '05 #7

P: n/a
Is E: a local drive on the server?

Ray at home

"Anil Gupte" <an*******@maxnetwork.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
OK, I failed. Can someone tell me what is going wrong in this code?

<% FPath = "e:\icinema.com\movies\raigarh\" & fn
Response.AddHeader "Content-Disposition", "attachment; filename=" & fn

Set adoStream = CreateObject("ADODB.Stream")
chunk = 2048
%>

I copied this from http://www.aspfaq.com/show.asp?id=2161 and saved it to
a file called download.asp However, when I click on the link to
Download.asp, it says it "cannot download download.asp". On Windows XP I
do not get even that, just a page cannot be displayed message.

Jul 22 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.