我正在尝试使用从这里下载的 ajaxtool 工具包用于颜色选择器。
当我尝试在我的任何页面上使用它时,它会显示一个错误
This page is missing a HtmlHead control which is required for the CSS
stylesheetlink that is being added. Please add <head runat="server" />.
可能是什么原因。如文档中所述,我使用的是 ToolScriptManager 而不是脚本管理器。我正在使用 Asp.net 3.5 并在内容页面下使用 colorPicker 控件并在同一位置添加 ToolScript Manager。
正如拉菲尔所说
<head>
<title>l</title>
<link href="<%= ResolveUrl("~/css/style.css") %>" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<%= ResolveUrl("~/css/chromestyle.css") %>"/>
<script src="<%= ResolveUrl("~/js/JScript.js") %>" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript" src="<%= ResolveUrl("~/js/chrome.js") %>"></script>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
如果我在 head 中添加 runat,我开始收到此错误
The Controls collection cannot be modified because the control
contains code blocks (i.e. <% ... %>).