I have the following code in one aspx file:
<a href="<%# myfunction() %>" ...
IIS isn't causing any effect here, the behavior is defined by the HTML spec. For navigation links, there are four common conventions an href attribute can follow:
//. The browser will resolve the link as an absolute URL.
Beginning with a single
/. The browser will resolve the link as relative to the domain.
Beginning with text. The browser will resolve the link as relative to the page.
#. The browser will look for an HTML element on the same page (by ID) and scroll to it if found.
I would compare the strings of the return value of your function, and the actual HTML markup rendered (not just what is navigated to or shown on hover).
To use an example on this page:
<a href="/questions">Questions</a> is a relative URL, which resolves to
<a href="http://example.com/questions">Questions</a> is an absolute URL, and resolves to an external domain at
Per one of your comments, the value your function would create a relative URL. If
<a href="domain.com/link?param="> was on this page, it would resolve http://stackoverflow.com/ as the domain.