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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing HTML Code as a String 1

Status
Not open for further replies.

markvan

Technical User
Sep 12, 2001
37
0
0
AU
How do I store some html code as a variable or string without the html syntax messing with the vb.net syntax?


Dim xhtmlheader As String = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"<html xmlns=" xml:lang="en" >"


note the " interupts the string, I tried \" like in C++ but that doesn't work! Is there an escape character or something?

Mark Van
EZ-PC Help
 
You double them up. So if you want to store "Joe Said" (including quotes), you'd use:
Code:
Dim myString As String
myString = ""Joe Said""
Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I am not near my .NET machine but couldn't you code the double quote as chr(34). It will look messy but it should do the trick.




 
it would be more like this

Code:
Dim xhtmlheader As String = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""
  ""[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">[/URL]
<html xmlns=""[URL unfurl="true"]http://www.w3.org/1999/xhtml""[/URL] xml:lang=""en"" >"

click on the process tgml link in step 2 options to find the code window thingie.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanx Christiaan

I will try that when I get back to college.

I will post back here to let you all know how it went.

Mark Van
EZ-PC Help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top