A
Amil Hanish
Earlier I had inquired as to why a normal <a href> tag didn't work when
using the VS hosted site using a random local port. The more I think about
it, this seems very wrong.
Using the random port hosted site, if I have <a href="/mypage.aspx">, this
link doesn't seem to work? I've verified this by creating a simple .htm
page with a link like this, then do a "View in browser". Clicking the link
results in page not found. I guess this is because the normal href doesn't
specify the port, eh?
Doesn't this seem bogus? It sure makes things harder to test. Granted you
can use a <asp:HyperLink>, but that seems like overkill in many cases.
Amil
========================
Hello Amil,
Typically you'll need it to be a relative path not a root path for this to
work. I usually do the ~/graphics/myimage.jpg trick, but that means that
the <img /> needs a runat="server" in the tag.
HTH
Thanks,
Shawn Wildermuth
Speaker, Author and C# MVP
http://adoguy.com
using the VS hosted site using a random local port. The more I think about
it, this seems very wrong.
Using the random port hosted site, if I have <a href="/mypage.aspx">, this
link doesn't seem to work? I've verified this by creating a simple .htm
page with a link like this, then do a "View in browser". Clicking the link
results in page not found. I guess this is because the normal href doesn't
specify the port, eh?
Doesn't this seem bogus? It sure makes things harder to test. Granted you
can use a <asp:HyperLink>, but that seems like overkill in many cases.
Amil
========================
Hello Amil,
Typically you'll need it to be a relative path not a root path for this to
work. I usually do the ~/graphics/myimage.jpg trick, but that means that
the <img /> needs a runat="server" in the tag.
HTH
Thanks,
Shawn Wildermuth
Speaker, Author and C# MVP
http://adoguy.com