DanielAc
02-07-2002, 09:04 AM
What is the best way I can code this.
I Only want a Response.Write if the field contains a value.
But I want it to use a minimal amount of code. I am sorta what you would call stingy when it comes to how many bytes I want my code to occupy, bad habit sometimes. Anyway...
So if I have:
Response.Write "• <a href='" & rs("fldFavLink1") & "'><font color='blue'>" & Replace(rs("fldFavLink1"),"http://", "") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink2") & "'><font color='blue'>" & Replace(rs("fldFavLink2"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink3") & "'><font color='blue'>" & Replace(rs("fldFavLink3"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink4") & "'><font color='blue'>" & Replace(rs("fldFavLink4"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink5") & "'><font color='blue'>" & Replace(rs("fldFavLink5"),"http://","") & "</font></a><br><br>"
And the client only decides to add 1 link to his database I do not want the display page to look like:
• www.jenniferknapp.com
•
•
•
•
What is the best way to go about this?
And also can't the above code be put into some For .. Loop anyway?
Thanks a million!
Daniel Acuff
I Only want a Response.Write if the field contains a value.
But I want it to use a minimal amount of code. I am sorta what you would call stingy when it comes to how many bytes I want my code to occupy, bad habit sometimes. Anyway...
So if I have:
Response.Write "• <a href='" & rs("fldFavLink1") & "'><font color='blue'>" & Replace(rs("fldFavLink1"),"http://", "") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink2") & "'><font color='blue'>" & Replace(rs("fldFavLink2"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink3") & "'><font color='blue'>" & Replace(rs("fldFavLink3"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink4") & "'><font color='blue'>" & Replace(rs("fldFavLink4"),"http://","") & "</font></a><br>"
Response.Write "• <a href='" & rs("fldFavLink5") & "'><font color='blue'>" & Replace(rs("fldFavLink5"),"http://","") & "</font></a><br><br>"
And the client only decides to add 1 link to his database I do not want the display page to look like:
• www.jenniferknapp.com
•
•
•
•
What is the best way to go about this?
And also can't the above code be put into some For .. Loop anyway?
Thanks a million!
Daniel Acuff