tilde-replacement changes from framework 1.0 to 1.1 ????

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top