How can I use the protocol specific url in the HEAD of the ASPX master page?

I am trying to link to the following CSS at the beginning of my master page template.

<link rel="stylesheet nofollow" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />

      

However, when it is displayed, it appears as ...

http://www.example.com/maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css

... which gives me 404.

What is the correct way to do this?

+3


source to share


1 answer


you can throw error by adding nofollow to link tag, see here

Do I need rel = "nofollow" in external scripts and stylesheets?

Edit: update based on OP's comment

This seems to be a known issue with older versions of visual studio. for starters you can try the following

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />

      



This might bring up another popup. if so you can try to either format the document (ctrl + K, ctrl + D) visual studio can sometimes clear this error if you have consistent line endings.

Link: http://forums.asp.net/t/1176284.aspx?Could+not+edit+because+it+is+not+in+the+web+site+

If that doesn't work, you can try and strip the scripts by following the advice for this SO post Visual Studio 2012 SP3 changing the href link when using ASP.NET in design view

The best recommendation seems to be to update visual studio if possible. know the versions of Visual Studio with error VS2008 up to SP1

0


source







All Articles