Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Set Pure ASP Upload to a plain text value

Posted 28 Jul 2004 23:12:36
1
has voted
28 Jul 2004 23:12:36 Lewis Killorn posted:
Hi
I am designing a form to add records to a database using the standard Dreamweaver Insert Recrod behaviour and am using PURE ASP upload for to give the option of uploading an image file.

In some cases an image will not be available so i want to be able to set the default value of the logo to a JPG that already exists on the server.

Does anyone know how I can do this by modifying the file field on the form??

Is their a way to set the default value of the file field to input a default value

Replies

Replied 29 Jul 2004 00:36:39
29 Jul 2004 00:36:39 Simon Martin replied:
You could set the default value for the field in the database - so any record created without an image would use the preset (no image available JPG).

Or the way I have done this is
<% If rsProperty.Fields.Item("picture".Value <>"" Then %>
<img src="photos/<%=(rsProperty.Fields.Item("picture".Value)%>" width="200">
<% Else %>
<img src="images/logo.jpg">
<% End If %>

Sharing knowledge saves valuable time!

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 29 Jul 2004 15:35:14
29 Jul 2004 15:35:14 Lewis Killorn replied:
Hey Simon
Thanks for the tip.
I didn't do exactly what i was looking for however gave me an ideal workaround.
Cheers
Lewis

Reply to this topic