<form id="Form1" method="post" runat="server">
加上
加上
解决方案 »
- 想要asp.net做点东西。
- VS2008与SQL2005数据库连接
- 怎样避免提交表单后,刷新页面造成的重复提交
- anthem 上传 BUG
- Html按钮,如何实现GridView里的复选框全选
- 如何以编程方式实现UpdatePanel中Triggers的添加
- 关于SMTP发送邮件出现的问题(asp.net)
- 请问各位牛,怎么在asp.net中设置ifram中的页面输出内容不被查看。
- 谁有asp.net入门的在线视频
- 查找oracle一定时间范围的sql语句怎么写?
- 怎样打开一个已有的EXCEL,然后将数据库中的数据写入EXCEL表中?
- 大家能不能帮我看看这个函数一直显示已有打开的与此连接相关联的 DataReader,必须首先将它关闭的错误?
加在哪里啊?我加在开头了,没效果
直接打开当然不行,你需要把这个文件配置到IIS下面的一个应用程序中,然后通过URL访问
用URL
http://localhost/begaspnet/ch01/punctual.aspx
打开的
系统盘:\WINDOWS\Microsoft.NET\Framework\v1.0.3705目录下执行:
aspnet_regiis.exe -i另外,你的代码也有一点点小问题:
...
<body> <h1>Welcome</h1>
In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
</body>
...
改为:
...
<body>
<form id="form1" method="post" runat="server">
<h1>Welcome</h1>
In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
</form>
</body>
...
<script language="c#" runat="server">
void Page_Load()
{
time.Text=DateTime.Now.Hour.ToString() + ":" +
DateTime.Now.Minute.ToString() + ":" +
DateTime.Now.Second.ToString();
}
</script><html>
<head><title>The Punctual Web Server</title></head>
<body>
<form id="Form1" method="post" runat="server">
<h1>Welcome</h1>
In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
</form>
</body>
</html>