Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 13th, 2004, 10:34 PM
GenZhi GenZhi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 GenZhi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face Disappearing Values in ASP

Why, in following example, does the IF statement make <%=(rsEvents.Fields.Item("EventDescription").Value)%> disappear?

The rest of the table is there, but the value of EventDescription disappears even though the IF statement is true.

Does this have something to do with code on the rest of the page, or is ASP fickle with this way of doing it? It seems to be intermittent?

I could do everything with a Response.Write, but this just seems simple and like it should work.

<% If (rsEvents.Fields.Item("EventDescription").Value) <> ("") Then %>

<tr valign="top">
<td nowrap bgcolor="#FFFFCC" class="SmPgBlack">Description:</td>
<td class="SmPgBlack"><%=(rsEvents.Fields.Item("EventDescription").Value)%></td>
</tr>


<% End If %>

Thanks in advance for any responses...

GenZhi

Reply With Quote
  #2  
Old June 14th, 2004, 09:12 AM
tfoulkes tfoulkes is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 9 tfoulkes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try::

<% If not rsEvents.Fields.("EventDescription")="" Then %>
<tr valign="top">
<td nowrap bgcolor="#FFFFCC" class="SmPgBlack">Description:</td>
<td class="SmPgBlack"><%=(rsEvents.Fields.Item("EventDescription").Value)%></td>
</tr>
<% End If %>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Disappearing Values in ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway