Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Leaders
Posted

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.

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...