Web Development

General discussion


Tricks of the Web dev trade

By MaryWeilage Editor ·
What are your favorite tricks of the trade, as featured in this week's Web Development Zone newsletter? Will you utilize the tricks Phillip describes in the column?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Why re-invent the wheel...

by HoyaSaxa93 In reply to Tricks of the Web dev tra ...

Interesting approach... However, ADO supports the binary read/write functionality you seek. This is a definite bonus when your web site's host will not install your custom DLL's.

Collapse -

HTML mail snooping

by bblackmoor In reply to Tricks of the Web dev tra ...

"Or, you're sending an HTML-formatted e-mail"

Which is, of course, EVIL...

"and you want to provide a 'read receipt' for that e-mail"

Which is, again, EVIL...

Use your powers for GOOD! Eschew HTML mail! Eschew spyware!

Collapse -

Why a DLL?

by jamie In reply to Tricks of the Web dev tra ...

Why use a DLL? Here is a simple function I found somewhere that works fantastic for downloading files. Changing the content-type should work like the DLL. ~Jamie

function DownloadFile(strFilePath)
Dim varSplit, strFileName, objStream
varSplit=split(strFilePath, "\")
If ubound(varSplit) > -1 then
strFileName = varSplit(ubound(varSplit))
response.contenttype = "application/octet-stream"
response.addheader "content-disposition","attachment; filename=" & strFileName
response.cachecontrol = "public"
set objstream = createobject("adodb.stream")
objstream.type = 1
objstream.loadfromfile strFilePath
response.binarywrite objstream.read
set objstream = nothing
end if
end function

Collapse -

Slight modification for use

by bazmech In reply to Tricks of the Web dev tra ...

I managed to make this fail almost straight away simply by using a 90K image.
One modification for use is to change the line

Dim i As Integer
Dim i As Long

just before the 'While -- Wend' loop.

I like the idea of using ADO.
Also FSO should be worth a look into.

Related Discussions

Related Forums