aspNetEmail

HtmlUtility.CharSet Property

The charset used for reading and manipulating the Html.

public string CharSet {set;}

Example

[C#]
            HtmlUtility utility = new HtmlUtility();
            string url = "http://www.google.com";
            utility.CharSet = "UTF-8";
             
            utility.LoadUrl( url );
             
            //set the UrlContent base
            utility.SetUrlContentBase = true;
             
            //set the basetag in the html
            utility.SetHtmlBaseTag = true;
             
            //render the Html so it is properly formatted for email
            utility.Render();
             
            //create an EmailMessage with appropriate text and html parts
            EmailMessage m = utility.ToEmailMessage();
             
            //load values from the web.config
            m.LoadFromConfig();
             
            m.Subject = "Html Utility Test";
             
            m.Send();
                
[Visual Basic]
            Dim utility As New HtmlUtility()
            Dim url As String = "http://www.google.com"
            utility.CharSet = "UTF-8"
            utility.LoadUrl(url)
             
            'set the UrlContent base
            utility.SetUrlContentBase = True
             
            'set the basetag in the html
            utility.SetHtmlBaseTag = True
             
            'render the Html so it is properly formatted for email
            utility.Render()
             
            'create an EmailMessage with appropriate text and html parts
            Dim m As EmailMessage = utility.ToEmailMessage()
             
            'load values from the web.config
            m.LoadFromConfig()
             
            m.Subject = "Html Utility Test"
             
            m.Send()
                

See Also

HtmlUtility Class | aspNetEmail Namespace