大家帮我找下错误用 ASP .NET 编写的动态页面
下面的代码可把我们的例子显示为一个 ASP.NET 页面:
www.wind360.cn<html>
<body bgcolor="yellow">
<center>
<h2>Hello W3School!</h2>
<p><%Response.Write(now())%></p>
</center>
</body>
</html>
www.nvrendu.com上面的语句有错误吗?

解决方案 »

  1.   

    你的默认语言是什么?
    C#的写法是
    <p><%Response.Write(System.DateTime.Now.ToString());%></p>Vb.NET里是可以那样写的
      

  2.   

    到底是asp还是asp.net啊,asp.net里不能直接用now()表示当前时间的,得用:
    <%Response.Write(DateTime.Now.ToString());%>
      

  3.   

    <p><%
    Response.Write(DateTime.Now.ToString())
    %></p>
      

  4.   

    DataTime.now,不能直接now表示当前时间
      

  5.   

    +1
    asp.net里不能直接用now()的,一般都是System.DateTime.Now.ToString()
      

  6.   

    <p><%
    Response.Write(“test”)
    %></p>