C# question - how do I convert a PageURI & Href to an absolute URL/URI?

断了今生、忘了曾经 提交于 2019-12-24 00:29:32

问题


How do I convert a PageURI & Href to an absolute URL/URI in C#?

i.e. I am scanning a web page at a given PageURI and in the HTML have link/node with a HREF, and want to translate this HREF into a valid absolute URI.

Background - note the trouble I was having here


回答1:


new URI(uri, string) does it



来源:https://stackoverflow.com/questions/2144150/c-sharp-question-how-do-i-convert-a-pageuri-href-to-an-absolute-url-uri

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!