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

Discussion in 'ASP .Net' started by CHristian Niss, Oct 31, 2003.

  1. 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
     
    CHristian Niss, Oct 31, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SStory

    Tilde for relative path

    SStory, Oct 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,761
    SStory
    Oct 19, 2003
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    Use of Tilde (~) and <LINK>

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, May 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,480
    =?Utf-8?B?QWxleCBNYWdoZW4=?=
    May 11, 2004
  3. MB2

    Tilde Expansion

    MB2, Sep 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    449
    Rick Strahl [MVP]
    Sep 24, 2004
  4. =?Utf-8?B?U2hhd24=?=

    Problems with Tilde in Microsoft Development Model

    =?Utf-8?B?U2hhd24=?=, Dec 24, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    670
    =?Utf-8?B?U2hhd24=?=
    Jan 5, 2005
  5. Jared Tullis
    Replies:
    11
    Views:
    3,185
    shekharshashi2000
    Mar 28, 2008
Loading...

Share This Page