I need to create a newsletters by URL. To do that, I:
- Create a
WebClient. - Use WebClient’s method
DownloadDatato get a source of page in byte array; - Get string from the source-html byte array and set it to the newsletter content.
However, I have some troubles with paths. All elements’ sources were relative (/img/welcome.png) but I need an absolute one, like http://www.example.com/img/welcome.png.
How can I do this?
One of the possible ways to resolve this task is the use the HtmlAgilityPack library.
Some example (fix links):