运行asp.net的问题

来源:百度知道 编辑:UC知道 时间:2024/05/28 17:12:52
我在IE中运行了个.ASPX文件``出现如下错误:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Head' is not declared.

Source Error:

Line 1: <% Head="以下是您所选购的物品清单"(注:这行字是红色的)
Line 2:
Line 3: '<!--#include file="Util.asp" -->

Source File: C:\Inetpub\wwwroot\Shopping\check.aspx Line: 1

请问这是什么意思``
TITLE 两边已经有<HEAD></HEAD>了``
具体如下 :
<% Head="以下是您所选购的物品清单"

'<!--#include file="Util.asp" -->
'<!--#include file="dbconn.asp"-->

ProductList = Session("ProductList")
If Len(ProductList) = 0 Then Response.Redirect "Nothing.asp"
If Request(&q

<% 是 asp.net 里面用于标记服务器端代码的特殊标记。

象你上面的“<% Head="以下是您所选购的物品清单"”,页面在被编译的时候,就把这条语句当成了一个赋值语句,即给 Head 这个变量赋值为字符串 "以下是您所选购的物品清单"

如果找不到 Head 这个变量,编译器当然要报错了哦,呵呵