Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Roockie HERE! :) 2

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how can i say
if strLink <<no equal to>> &quot;NULL&quot; then
Response.write &quot;<IMG SRC='linkicon.gif' width=10 height=12>&quot;
else <<do nothing>>

 
to do that just do this:

<%
If strLink <> &quot;&quot; then
Response.write &quot;<IMG SRC='linkicon.gif' width=10 height=12>&quot;
End if
%> www.vzio.com
ASP WEB DEVELOPMENT



 
the null and the zero-length string are different. To test the null value, use the isNull() function.

if not isNull(strLink) then
Response.write &quot;<IMG SRC='linkicon.gif' width=10 height=12>&quot;
end if

If the value you're testing coming from the database, it could be a null or a string. If it's a non-initialized ASP variable use isEmpty(). If it's empty or nonexisted Form/QueryString item then the result is a zero-length string, and snowboardr's method is perfect for that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top