In some of the sites I develop, I use the
BASE HREF tag. Unfortunately, doing this poses problems when you’re using Web forms in ASP.Net if your Web form is in a directory below the root directory.
If I create a page using Web forms in a subdirectory – as in
http://somehostname/subfolder/webform.aspx – the
FORM ACTION property of the form will point to
http://somehostname/webform.aspx. Note how subfolder disappeared. This happens because of the
BASE HREF tag. ASP.Net Web forms create the
FORM ACTION without any reference to the physical path of the file – something that is not a problem unless you’re using
Unfortunately, in a server-side
FORM tag, you can not specify the
FORM ACTION of a server-side ASP.Net Web form, I do something like this:
BASE HREF tag!