Johnathan Sewell
Johnathan Sewell

Reputation: 759

Visual Studio - Could not edit because it is not in the website

I have a link to some style sheet from the Yahoo Developer Network, this is what I have in the head section of my master page:

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/reset/reset-min.css&2.8.0r4/build/base/base-min.css" media="all" />

And for some reason Visual Studio (2008 Professional) keeps telling me:

"could not edit 'http://yui.yahooapis.com/combo?2.8.0r4/build/reset/reset-min.css&2.8.0r4/build/base/base-min.css' because it is not in the website".

My head tag has a runat="server" attribute so I can't have any code in there to inject the url.

Has anyone managed to get rid of this very useful message?

Upvotes: 1

Views: 2075

Answers (3)

tim
tim

Reputation: 29

I was having this same issue in referencing the following style sheet, so I wrapped in a Response.Write, after that, the annoying message box stopped appearing.

<% Response.Write( @"<link rel=""stylesheet"" href=""http://static.jquery.com/ui/css/base2.css"" type=""text/css"" media=""all"" />" ); %>

I had also tried rel="stylesheet nofollow", but IE doesn't like that and will not render properly. The above works fine for FireFox and IE.

Upvotes: 0

nekno
nekno

Reputation: 19267

Though a definitive solution hasn't been found, a Microsoft guy in this ASP.NET Forums thread is asking for projects that exhibit this issue.

The proposed solutions that may work for you, but haven't worked for me, include:

  1. Ensure your CSS file has uniform line endings. Edit menu > Format Document in Visual Studio. Of course, this is hard when the file is on a Yahoo server.
  2. Install Visual Studio 2008 SP1.
  3. Open Visual Studio first, then open the solution file. (Don't open the solution file directly by double-clicking in Windows Explorer.)

Upvotes: 2

JL.
JL.

Reputation: 81292

Can you create a local copy of the stylesheet? Just during development, then switch it back to online source once you're ready for production?

Upvotes: 0

Related Questions