Problems with Tilde in Microsoft Development Model

G

Guest

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 production server.

Recently, I have needed to collaborate with other developers using Source
Safe. But, in order to get source safe working properly, you really need to
be working in virtual directories of the default web site.

Fine, so I started to convert over sites and began using the "~" character
to resolve images, etc. to the root of the application.

However, certain items such as the "backbround" element of the <TD> and
<table> tags does not provide resolution of the "~" character.

What is the proper method for this scenario?

Shawn Zavoda
 
E

Edge

Shawn said:
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 production server.

Recently, I have needed to collaborate with other developers using
Source Safe. But, in order to get source safe working properly, you
really need to be working in virtual directories of the default web
site.

Fine, so I started to convert over sites and began using the "~"
character to resolve images, etc. to the root of the application.

However, certain items such as the "backbround" element of the <TD>
and <table> tags does not provide resolution of the "~" character.

What is the proper method for this scenario?

Shawn Zavoda

The tilde only works with server controls.

I think it will work if you just add "runat=server" to your <table> tags.
 
G

Guest

You are correct about the Runat=server problem. However, the table and td
and many other html controls do not support it even then. This is a problem
that I have seen other users have without any resolution.

Thanks!

Shawn
 
M

Matt Berther

Hello Shawn,

The ~ character only works with runat=server controls that use the Page.ResolveUrl
method to resolve the url.
 
G

Guest

Hi Matt,

Yes, I realize that - that was the reason for the origial post. If the
tilde will not work for the <table> and <td> tags, how is a developer suppose
to implement the Miscrosoft recommended development environment and use
SourceSafe which requires that all ASP.net projects exists under the default
website as virtual web sites?

Without some way to reference the application root rather than the web root,
the application cannot be developed at that location.

PS: I was hoping a Microsoft official was going to monitor these threads
and provide responses as what I thought was stated on their MSDN Subscriber
pages - I am looking to use up a case for this crazy problem....

Thanks.

Shawn
 
M

Matt Berther

Hello Shawn,

Is there a reason why you cant use <asp:table>? This should provide the ~
resolution you're looking for.
 
G

Guest

Hi,

The main issue with that is that I have existing sites that need to be
copied into this framework model that are quite large. Manually updating
hundreds of pages would be very costly.

There is that additional problem of non-standard controls such as flash
movies, etc.

I am going to call MSoft on this today or tomorrow to see what they have to
recommend.

How are you setup in your development environment? My previous workaround
was always to reate a physicial website with unique IP for each dev prokect.
But, with Source Safe, this is not allowed.....

Thanks!!

Shawn
 
J

John Saunders

Shawn said:
Hi,

The main issue with that is that I have existing sites that need to be
copied into this framework model that are quite large. Manually updating
hundreds of pages would be very costly.

There is that additional problem of non-standard controls such as flash
movies, etc.

I am going to call MSoft on this today or tomorrow to see what they have
to
recommend.

How are you setup in your development environment? My previous workaround
was always to reate a physicial website with unique IP for each dev
prokect.
But, with Source Safe, this is not allowed.....

Actually, it's VS.NET that has a problem with that, not SourceSafe. Have you
seen the following (I've probably posted this already):

Team Development with Visual Studio .NET and Visual SourceSafe
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_rm.asp?frame=true)

What I usually do is develop a site as http://localhost./site (using tilde)
then deploying to http://site.company.com/.

John Saunders
 
G

Guest

Hi John,

Yes - I did check out that site to some degree, although I admit not in full
depth.

My goal to to do the same procedure as you have mentioned. But, how are you
able to handle the problems with tilde when it comes to controls such as
<table>, <td>, flash movies, etc. that do not evalulate the tilde even when
the runat=server attribute is used?

The previous post recommended that I use the ASP:Table model, which would
require a great re-code effort, but could be a work around, however still
leaves Flash Movie controls and others that have no Server Control
implementations.

PS: I understood that the problem was not with SourceSafe per sae, just
that it was not a problem until I began to use sourcesafe....

Thanks!!

Shawn
 
J

John Saunders

Shawn said:
Hi John,

Yes - I did check out that site to some degree, although I admit not in
full
depth.

My goal to to do the same procedure as you have mentioned. But, how are
you
able to handle the problems with tilde when it comes to controls such as
<table>, <td>, flash movies, etc. that do not evalulate the tilde even
when
the runat=server attribute is used?

Actually, I cheated. I had actually started using "~" before Microsoft had
documented it. I borrowed it from Unix. My implementation had forms like
~foo/, which would look up "foo" in the web.config and plug it in, as well
as ~/, which looked up a default value from web.config and plugged it in. In
order to do that, I already had code to iterate through all server controls
on the page looking for "~" and replacing it with the calculated value.

The previous post recommended that I use the ASP:Table model, which would
require a great re-code effort

I found it useful to learn how to use the Replace In Files functionality in
VS.NET to do global replacements like this.
but could be a work around, however still
leaves Flash Movie controls and others that have no Server Control
implementations.

I've never used Flash. How are Flash movies embedded in the HTML? With
<object> tags? If so, try <object runat="server">.


John Saunders
 
G

Guest

Thanks for the reply, John.

I see your solution - unfortunately, another workaround. I have to hope in
my heart that the developers at MS are using a more HTML friendly solution
for their environment setup. I am not thrilled with having to use server
controls in places that they are not needed - why have the extra overhead to
evaluate and convert to HTML?

The flash movies are in the <object> tags format, however, like the <table>
tag, the tilde is not evaluated.

I will call MS today before I start spending valuable time and money
converting sites. I will post their feedback here as soon as I have it.

Shawn
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top