PDA

View Full Version : Replace String


Baleric
03-01-2005, 09:57 AM
hey guys i am trying to add 2 Replace commands in the one string and im having a litle trouble, i am using <%=Replace(GuestBK.Fields.Item("txtmessage"), vbCrLf, "<br/>" %> and that is working great, but then i also want to replace ": )" with a picture of :) , this is wat i thought it would be, <%=Replace(GuestBK.Fields.Item("txtmessage"), vbCrLf, "<br/>" & ": )", <img src="../Images/Smily.jpeg">)%> ... but no luck, please help guys... thank you

also, if someone knows how to make the little smily pics ont he side of the text box so when i click the smiling face it makes a : ) in the text box... please post how, thanks again guys

glenngv
03-01-2005, 12:15 PM
You need to replace twice.

<%=Replace(Replace(GuestBK.Fields.Item("txtmessage"), vbCrLf, "<br/>"), ": )", "<img src=""../Images/Smily.jpeg"">")%>

Baleric
03-03-2005, 09:14 AM
thank you very much glenngv, it worked perfect :)