I have inserted a web.config key as below:
<add key="WebInstance" value="/testApp"/>
When I call my Site.Master
<link rel="stylesheet" href="<%= WebInstance%>/themes/bs3/css/bootstrap.min.css" />
In my Site.Master.cs
private string _webInstance = ConfigurationManager.AppSettings["WebInstance"]
public string WebInstance { get { return _webInstance ; }}
The first referencing in Site.Master works perfectly. Example:
<link rel="stylesheet" href="/testApp/themes/bs3/css/bootstrap.min.css" />
But in the other pages, it references the full tag.
For instance, when I do inspect element on the browser function, what I see on my <head></head> tags are these:
<link rel="stylesheet" href="<%= WebInstance %>/themes/bs3/css/bootstrap.min.css" />
I also had the functions of getting the key on my ascx.cs
Why is it just calling the tag instead of getting the real value?
UPDATE
SITE.MASTER and the 'other' pages are 2 different things, the WebInstance key is from the web.config file.
In Site.Master.cs I have its own function to call to the Key and also the other pages have their own respective functions to call the Key.
UPDATE AGAIN
I have found the answer to all this, I had runat="server" on my <Head></Head> tags on the other pages, removing it solved the problem. Thanks anyway ;)

Site.Masteris not a page, it is a master page, you cannot open it on its own. Can you explain what exactly do you mean by "The first referencing in Site.Master works perfectly."?<%= WebInstance %>as a physical path and not converting it to the key I want.