名爵 mg gt:我运行ASP.NET在电脑上,出现这样的错误提示:

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/19 10:39:26
Server Error in '/net' Application.
--------------------------------------------------------------------------------

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: CS0246: The type or namespace name 'datetime' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 1: <%@page language="C#"%>
Line 2: <%response.write (datetime.now.tostring());%>

请高手帮我剖析一下。我的电脑就是运行不了ASP.NET程序。。。
错误在第二行。

Line 2: <%response.write (datetime.now.tostring());%>
这一行不是asp.net的语句,是ASP的,在ASP.NET中可以给一个label控件赋值,如下:
label1.text=datetime.now.tostring