how to get the full domain with http type (http or https) of a link in asp.net?
<p>My asp.net application will be distributed to different users. It should retrieve the domain and http type of a link automatically.</p>

<p>For example:</p>

<ol>
<li><a href="http://abc.com/test.aspx" rel="nofollow">http://abc.com/test.aspx</a></li>
<li><a href="https://abc.com/test2.aspx" rel="nofollow">https://abc.com/test2.aspx</a></li>
</ol>

<p>I need a method to retrieve either: <a href="http://abc.com" rel="nofollow">http://abc.com</a> and <a href="https://abc.com" rel="nofollow">https://abc.com</a> from those links automatically.</p>

<p>How can I do that?</p>

<p>thanks in advance. </p>
