I am trying to use the Response.Write () method to dynamically insert content into <head> on an aspx page. I need to enter a string value from a property of a code object that is a link to my CSS file. However, it is not handled properly at runtime. The object is public in the class and hydrated in the Page_Load () event. Inside the page page, I can successfully add other properties from the Corpoartion object without problems.
Why does this not work in <head>?
This is the part that is not distributed correctly:
<link href="<%= Corporation.PageStyleSheet %>" rel="stylesheet" type="text/css" />
Here is the whole <head>:
<head runat="server">
<title></title>
<link href="<%= Corporation.PageStyleSheet %>" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript" src="cntv_menu.js"></script>
<script language="JavaScript" type="text/JavaScript" src="cntv_category.js"></script>
</head>
What is the reason that it will not expand correctly?