You're specifying a relative URL. This will be relative to the current page. If you're in the root of your site, both links will be correct. But if you're on a page in the
A
folder, both links will be wrong, as they'll resolve to
/A/A/Webform1.aspx
and
/A/B/Webform2.aspx
.
Add
runat="server"
to the
<a>
tags, and use app-relative paths:
<a runat="server" href="~/A/Webform1.aspx">Sample 1</a>
<a runat="server" href="~/B/Webform2.aspx">Sample 2</a>
That way, ASP.NET will resolve the links relative to the root of your application, and will output the correct link for you.