C
CHristian Niss
hi there,
in a lot of user controls we are using "~" in server tags to reference objects
like images <img src="~/images/something.gif" runat="server" />.
with framework 1.0 the tilde got replaced by "/virtualdir" for example. now in
framework 1.1 tilde is replaced with relative paths like "../../"
this makes a lot of trouble, especially when you dynamically load user controls
to an aspx-page. it seems that this relative "../.."-path is dependent on
the location of the user control and not dependent on the location of the
aspx-file.
in our case this causes a lot of trouble with "not found images", when we
install our software in a virtual directory. this "../.."-path goes up one
directory-level too much.
our server: localhost
our virtual-dir: localhost/myproject
aspx-file location: myproject/script.aspx
ascx-file location: myproject/controls/control1.ascx
in control1.ascx we use <img src="~/images/something.gif" runat="server" />
with framework 1.0 src was replaced to "/myproject/images/something.gif"
with framework 1.1 src is replaced to "../images/something.gif"
is there any way to force tilde-replacement into using absolute paths
instead of relative paths ???
thanks a lot
CHris
in a lot of user controls we are using "~" in server tags to reference objects
like images <img src="~/images/something.gif" runat="server" />.
with framework 1.0 the tilde got replaced by "/virtualdir" for example. now in
framework 1.1 tilde is replaced with relative paths like "../../"
this makes a lot of trouble, especially when you dynamically load user controls
to an aspx-page. it seems that this relative "../.."-path is dependent on
the location of the user control and not dependent on the location of the
aspx-file.
in our case this causes a lot of trouble with "not found images", when we
install our software in a virtual directory. this "../.."-path goes up one
directory-level too much.
our server: localhost
our virtual-dir: localhost/myproject
aspx-file location: myproject/script.aspx
ascx-file location: myproject/controls/control1.ascx
in control1.ascx we use <img src="~/images/something.gif" runat="server" />
with framework 1.0 src was replaced to "/myproject/images/something.gif"
with framework 1.1 src is replaced to "../images/something.gif"
is there any way to force tilde-replacement into using absolute paths
instead of relative paths ???
thanks a lot
CHris