starcraft Posted July 27, 2003 Posted July 27, 2003 OK in my program i am adding HTML logging. so i have the code Dim log As StreamWriter = File.AppendText("C:\Log.html") log.Write("<font color="#c0c0c0>"Added text:"{textbox1.text)") log.Close() but when i look at the log file it says:Added text:(textbox1.text) in plain white. I added the <font color="#c0c0c0"> to make that line of text silver. and it also says there is a problem couse of the '#' it says Comma, ')', or a valid expression continuation expected. how can i color code the log file and how do i add things like "Text added" and then what is in textbox1? Quote
Leaders dynamic_sysop Posted July 27, 2003 Leaders Posted July 27, 2003 log.Write("<font color=""#c0c0c0>""Added text:"" & textbox1.text) you have a { where there shouldnt be 1 , also you shouldn't enclose the textbox1.text in brackets , if you want to add the text from inside it. Quote
starcraft Posted July 27, 2003 Author Posted July 27, 2003 when i do that i get this<font color="#c0c0c0>"Added text:" & textbox1.text do i maybe have to import some kind of HTML thing in order to save files as html correctly? Quote
*Experts* mutant Posted July 27, 2003 *Experts* Posted July 27, 2003 Just use single quote instead of ". ("<font color='#c0c0c0'>Added text: " & textbox1.text & "</font>") Quote
starcraft Posted July 27, 2003 Author Posted July 27, 2003 thanks mutant, gosh what would i do without you? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.