VBdotnet2005
asked on
txt to HTML
Is there a way to convert txt file to HTML in VB.net? Please provide links or code if have it. Thank you very much.
ASKER
I want to convert an actual txt (the whole file) into HTML file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i don't see Server.HTMLEncode
Ah, you need to import the below and use HttpUtility.HtmlEncode:
Imports System.Web
html = HttpUtility.HtmlEncode(tex t)
Imports System.Web
html = HttpUtility.HtmlEncode(tex
ASKER
I did import, but I don't see HttpUtility.HtmlEncode
This is what I have. I am using VS 2008 pro
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Imports System.Web
Imports System.Data.DataSet
Imports System.Data.DataTable
Imports System.Net.Mail
Imports System.Linq
Imports System.Text
Imports System.Text.RegularExpress ions
Imports System.Xml
This is what I have. I am using VS 2008 pro
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Imports System.Web
Imports System.Data.DataSet
Imports System.Data.DataTable
Imports System.Net.Mail
Imports System.Linq
Imports System.Text
Imports System.Text.RegularExpress
Imports System.Xml
I mean
My Sample String -> <html><body>My Sample String</body></html>
???