Click to See Complete Forum and Search --> : code works in one page, but not the other - why?


mangeloni
03-02-2003, 09:36 PM
I've got the following code which works on one edit page:

<% if (EditGuesser.Fields.Item("BG_Photo2") != "") { %>
<img src="../uploaded_images/<%=(EditGuesser.Fields.Item("UserName").Value)%>/<%=(EditGuesser.Fields.Item("BG_Photo2").Value)%>">
<% } else if (Response.Write("You have not uploaded a Photo2 for your Guesser")) { %>
<% } %>

I have copied and pasted this code into 2nd edit page where the record set and field names are exactly the same. While the image will display when the field has a value, the Response.Write will not display when the value is empty.

What is going on here that I am not seeing? Is there another way to code this?

Any help is greatly appreciated

~MVA

mangeloni
03-03-2003, 12:06 AM
Thanks for your help...but...

I copied in your code but got a syntax error for the last curly bracket. so I took out the <% } %>

But now getting a syntax error expecting a ';'

Something is missing from my 'punctuation' here. : \

~MVA

celebguy_dv
03-04-2003, 12:24 AM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)

celebguy_dv
03-04-2003, 01:40 AM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)