By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,773 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,773 IT Pros & Developers. It's quick & easy.

store file in string...not openfile

P: n/a
How can I store an entire html file in a string with all it's formating,
double quotes, multiple lines and all??
like this:

Dim FileString As String = ENTIRE HTML FILE

thanks,
Trint

.Net programmer
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Trint,
Have you tried the code in your previous message, only with double nested
quotes?

Dim file As String = "<html xmlns:v=""urn:schemas-microsoft-com:vml""" _
"xmlns:o=""urn:schemas-microsoft-com:office:office""" _
"xmlns:dt=""uuid:C2F41010-65B3-11d1-A29F-00AA00C14882""" _
...

Because its a "constant" it will be evulated at run time as a single string.

However! rather then go through the tedium of typing that, I would consider
embedding the HTML file as a resource into my assembly, then read the
resource into the string when I needed it.

I don't have a specific sample of embedding an HTML file, however I would
start here:
http://msdn.microsoft.com/library/de...gResources.asp

Hope this helps
Jay

"Trint Smith" <tr********@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
How can I store an entire html file in a string with all it's formating,
double quotes, multiple lines and all??
like this:

Dim FileString As String = ENTIRE HTML FILE

thanks,
Trint

Net programmer
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

P: n/a
Thanks,
I will try that

.Net programmer
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.