Forums

This topic is locked

ASp Upload into SQL 2000

Posted 30 May 2002 18:44:42
1
has voted
30 May 2002 18:44:42 Adrian Burns posted:
Hi All

I am using Pure ASP 2.08 to upload images into a table and then using an image field to show the image in a details page. This is fine if someone actually uploads an image but it shows displays a missing image type if they do not. I have tried to insert a default value of a noimage.gif into the database if the upload is left blank but it does not work. Can anyone expalin how to correct this if no oneactually uploads an image

Replies

Replied 31 May 2002 09:04:52
31 May 2002 09:04:52 Viktor Farcic replied:
<% If (Recordset.Fields.Item("Image".Value <> "" Then %>
CODE FOR DISPLAYING IMAGE
<% Else %>
CODE IF THERE IS NO IMAGE
<% End If %>

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi All

I am using Pure ASP 2.08 to upload images into a table and then using an image field to show the image in a details page. This is fine if someone actually uploads an image but it shows displays a missing image type if they do not. I have tried to insert a default value of a noimage.gif into the database if the upload is left blank but it does not work. Can anyone expalin how to correct this if no oneactually uploads an image


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 31 May 2002 10:01:01
31 May 2002 10:01:01 Adrian Burns replied:
Thanks for your post but im new to this asp stuff so could you please give me an example of the CODE FOR DISPLAYING IMAGE

and also CODE IF THERE IS NO IMAGE

If possible I would like to display the default image /site/images/noimage.gif

Many thanks

Adrian



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
&lt;% If (Recordset.Fields.Item("Image".Value &lt;&gt; "" Then %&gt;
CODE FOR DISPLAYING IMAGE
&lt;% Else %&gt;
CODE IF THERE IS NO IMAGE
&lt;% End If %&gt;

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi All

I am using Pure ASP 2.08 to upload images into a table and then using an image field to show the image in a details page. This is fine if someone actually uploads an image but it shows displays a missing image type if they do not. I have tried to insert a default value of a noimage.gif into the database if the upload is left blank but it does not work. Can anyone expalin how to correct this if no oneactually uploads an image


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Replied 31 May 2002 14:55:02
31 May 2002 14:55:02 Viktor Farcic replied:
&lt;% If (Recordset.Fields.Item("Image".Value &lt;&gt; "" Then %&gt;
&lt;img src="uploads/&lt;%=(Recordset.Fields.Item("Image".Value)%&gt;"&gt;
&lt;% Else %&gt;
&lt;img src="WhatEverIsTheNameOfImageYou WantToDisplayInsteadOfMissingOne.jpg"&gt;
&lt;% End If %&gt;

Viktor Farcic

TalkZone Manager
Replied 31 May 2002 15:56:29
31 May 2002 15:56:29 Adrian Burns replied:
Once again I thank you for your help

All the best and good luck in Korea Japan

Adrian





<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
&lt;% If (Recordset.Fields.Item("Image".Value &lt;&gt; "" Then %&gt;
&lt;img src="uploads/&lt;%=(Recordset.Fields.Item("Image".Value)%&gt;"&gt;
&lt;% Else %&gt;
&lt;img src="WhatEverIsTheNameOfImageYou WantToDisplayInsteadOfMissingOne.jpg"&gt;
&lt;% End If %&gt;

Viktor Farcic

TalkZone Manager
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Replied 05 Jun 2002 08:55:54
05 Jun 2002 08:55:54 Adrian Burns replied:
That worked Great

many thanks

Adrian



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
&lt;% If (Recordset.Fields.Item("Image".Value &lt;&gt; "" Then %&gt;
&lt;img src="uploads/&lt;%=(Recordset.Fields.Item("Image".Value)%&gt;"&gt;
&lt;% Else %&gt;
&lt;img src="WhatEverIsTheNameOfImageYou WantToDisplayInsteadOfMissingOne.jpg"&gt;
&lt;% End If %&gt;

Viktor Farcic

TalkZone Manager
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic