Create links in Aspose.Html


Hi team,
i don’t know how to create a link (tag a with href) to an external Url within Aspose.Html for .Net. Something like:
My link
I could’nt find how to do it in the documentation.

I try tu create an HTMLAnchorElement but when a save my HTML file, the href was replaced by a local uri.

Sorry, I’ve seen that the problem is not the link, the problem is when a Save the HtmlDocument to a file. This function raplaces the link by a local address with the suffix “_files”.

Thanks in advance

2018-09-06_154545.jpeg (17.1 KB)



Thank you for contacting support.

We are looking into your requirements and will get back to you soon with our findings.



We would like to update you that you can create a link in HTML file by using below code snippet in your environment.

        HTMLDocument document = new HTMLDocument();
        HTMLAnchorElement a = (HTMLAnchorElement)document.CreateElement("a");
        a.Href = "";
        a.TextContent = "Aspose Website";

Generated HTML file has also been attached for your kind reference.

We hope this will be helpful. Please feel free to contact us if you need any further assistance.