473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Tilde Expansion

MB2
I have code in a User Control for an image button like this:
<asp:ImageButton id="__0" runat="server" text="Delete"
ImageUrl="~/Images/ImageLibrary/icon_delete.gif" />

This used to work and it would display the image properly.

However, since installing the latest service pack for the .NET
Framework 1.1, the tilde seems to be expanding improperly. The code
that is expanded to shows this:
<input type="image" name="Template1:_fixed0:_fixed0:_ctl0:Repeater_0:_ ctl5:__0"
id="Template1__fixed0__fixed0__ctl0_Repeater_0__ct l5___0"
text="Delete" src="../../Images/ImageLibrary/icon_delete.gif" alt=""
border="0" />

Unfortunately src="../../Images" is not the correct path to that
directory. Does anyone know if Microsoft implemented the tilde
expansion differently than before. Does anyone know if there is a way
around this problem?

Any help is greatly appreciated.

Thanks,
Morry
Nov 18 '05 #1
1 3704
The ~ should link back to the application root which is where the virtual is
defined. So maybe something has changed in the way that you are referencing
the approot?

At the control level this behavior may look different than at the page
level. Take a look at Page.ResolveUrl() and Control.ResolveUrl() which are
used to resolve the ~...

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
----------------------------------
Making waves on the Web
"MB2" <mb*****@hotmail.com> wrote in message
news:6a************************@posting.google.com ...
I have code in a User Control for an image button like this:
<asp:ImageButton id="__0" runat="server" text="Delete"
ImageUrl="~/Images/ImageLibrary/icon_delete.gif" />

This used to work and it would display the image properly.

However, since installing the latest service pack for the .NET
Framework 1.1, the tilde seems to be expanding improperly. The code
that is expanded to shows this:
<input type="image" name="Template1:_fixed0:_fixed0:_ctl0:Repeater_0:_ ctl5:__0" id="Template1__fixed0__fixed0__ctl0_Repeater_0__ct l5___0"
text="Delete" src="../../Images/ImageLibrary/icon_delete.gif" alt=""
border="0" />

Unfortunately src="../../Images" is not the correct path to that
directory. Does anyone know if Microsoft implemented the tilde
expansion differently than before. Does anyone know if there is a way
around this problem?

Any help is greatly appreciated.

Thanks,
Morry

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: monte | last post by:
Hello, I need to parse a tilde delimited file and output it to a tabbed delimited file. Example file example.txt data1~data2~data3~data4 data5~data6~data7~data8 I need to extract data2,...
0
by: CHristian Niss | last post by:
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...
10
by: Shawn | last post by:
Hi, For a few years, I have been developing each of my clients websites using a seperate web site (unique IP) to solve problems with relative URL's between my local dev station and the...
9
by: Jared Tullis | last post by:
We have an .NET 1.1 application running on 4 2K3 load balanced servers (using WLBS). IIS has the .NET aspnet_isapi.dll mapped as a wildcard application map. The web.config points *.html to a...
3
by: Karo | last post by:
I have troubles with tilde (~) character on my host. It gets replaced by server name instead of domain name from where redirect is coming from. Code...
1
by: Mythran | last post by:
In other web servers, more specifically apache and even non-web servers you can use the tilde character to specify the root directory, or home. Before I go reinventing the wheel (by parsing a...
4
by: ibiza | last post by:
Hi all, I have a problem which I don't understand with the "~" mark in a NavigateUrl property of an asp:HyperLink. I have this in a master page, to build the standard menu (rMenuItems is a...
2
by: jbolty | last post by:
There have been a few threads talking about using the tilde ~, to reference the webroot path. My problem though is handling an unexpected tilde in a url. this url: ...
4
by: =?Utf-8?B?QWxm?= | last post by:
Hello all, I am having trouble dealing with ~(tilde) in my .Net 1.1 web application, specially when it comes through the URL. For example, when someone requests the following URL:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.