Forums

ASP

This topic is locked

hidden fields

Posted 19 Aug 2006 01:30:32
1
has voted
19 Aug 2006 01:30:32 Tina Paulus posted:
I have a site I am trying to allow my patrons to put classified ads in themselves. I have a form page that lets them do that, but can I put a hidden field that automatically inputs a picture in their ad from my site (such as a "NO Picture" gif)? And if so, how do I do that? I have Dreamweaver MX 2004. I is my first asp pages (learning as I go). Thank you so much for your help.

Replies

Replied 23 Aug 2006 04:18:16
23 Aug 2006 04:18:16 Wim Conix replied:
Tina,

Do you mean that a "no picture" gif has to show up when no picture is actually uploaded ?
In that case I guess you can fix this with a simple IF...THEN...ELSE

For example :
<%IF (Recordset1.Fields.Item("Picturefield".Value) IS NULL THEN%>
<img src="path to your no picture gif on the server">
<%ELSE Response.Write (Recordset1.Fields.Item("Picturefield".Value)
END IF%>

Most easy is to insert the picture value from the database in your page as it would be always there and then change the code and apply the IF...THEN...ELSE

Something like that.

Hope this helps a little, greetzz

Wim

Wim Conix
www.image-belle.com

Reply to this topic