主题:[讨论]这是什么原因导致的
在一开始,这些代码可以正常在浏览器中显示,但是当我装了一个dotnetfx_2.exe后,从新在浏览器中访问ASP。NET页面时出现的全部是我写的程序,我是一个初学者,望各位高手指点。
这是我访问的路径
http://192.168.1.101/ceshi/test.aspx
在浏览器中显示:(全部是我的程序)
<%@Page Language="vb" ContentType="text/html" ResponseEncoding="gb2312"%>
<%
response.write ("<font size=5 color=#FF000>注:绿色部分是由datetime物件获取的数据;橘黄色部分是由.net基本函数获取的数据</font>")
Response.Write("<br>")
Response.Write("<br>")
Response.Write("<br>")
Dim mybir AS date
Dim myend AS date
Dim mystar AS date
mybir=#01/24/1985#
myend=#18:00:00#
star=#10/01/1949#
Response.Write("<font size=3 color=#FF6600>我的生日是:</font> " & CStr(mybir))
Response.Write("<br>")
response.write("<font size=3 color=#FF6600>今年是:</font> " & CStr(Year(Now())))
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今年是:</font> " & datetime.today.year() & "年")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & CStr(Now()))
Response.Write("<br>")
Response.Write("<font size=3 color=#FF8745>现在是:</font> " & datetime.now())
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是:</font> " & CStr(month(now())) & "月")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是:</font> " & datetime.today.month() & "月")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是9月的第:</font> " & CStr(day(now())) &"天")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是9月的第:</font> " & datetime.today.day() & "天")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分" & CStr(second(Now())) & "秒")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时的" & datetime.now.minute() & "分")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时的" & datetime.now.minute() & "分" & datetime.now.second() & "秒")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是一周的第:</font> " & CStr(weekday(Now())) & "天(注:星期天为第一天)")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是一周的第:</font> " & datetime.now.dayofweek() & "天(注:星期一为第一天)")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在距下班还有:</font> " & CStr(cshort(hour(myend)-hour(Now()))) & "小时")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在距离大年30还有:</font> " & CStr(365-datetime.now.dayofyear()) & "天")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今年是建国:</font> " & CStr(Year(Now())-Year(star)) & "周年")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是一年中的第:</font> " & datetime.now.dayofyear() & "天")
Response.Write("<br>")
%>
这是什么错误啊!
这是我访问的路径
http://192.168.1.101/ceshi/test.aspx
在浏览器中显示:(全部是我的程序)
<%@Page Language="vb" ContentType="text/html" ResponseEncoding="gb2312"%>
<%
response.write ("<font size=5 color=#FF000>注:绿色部分是由datetime物件获取的数据;橘黄色部分是由.net基本函数获取的数据</font>")
Response.Write("<br>")
Response.Write("<br>")
Response.Write("<br>")
Dim mybir AS date
Dim myend AS date
Dim mystar AS date
mybir=#01/24/1985#
myend=#18:00:00#
star=#10/01/1949#
Response.Write("<font size=3 color=#FF6600>我的生日是:</font> " & CStr(mybir))
Response.Write("<br>")
response.write("<font size=3 color=#FF6600>今年是:</font> " & CStr(Year(Now())))
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今年是:</font> " & datetime.today.year() & "年")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & CStr(Now()))
Response.Write("<br>")
Response.Write("<font size=3 color=#FF8745>现在是:</font> " & datetime.now())
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是:</font> " & CStr(month(now())) & "月")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是:</font> " & datetime.today.month() & "月")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是9月的第:</font> " & CStr(day(now())) &"天")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是9月的第:</font> " & datetime.today.day() & "天")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在是:</font> " & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分" & CStr(second(Now())) & "秒")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时的" & datetime.now.minute() & "分")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>现在是:</font> " & datetime.now.hour() & "时的" & datetime.now.minute() & "分" & datetime.now.second() & "秒")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今天是一周的第:</font> " & CStr(weekday(Now())) & "天(注:星期天为第一天)")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是一周的第:</font> " & datetime.now.dayofweek() & "天(注:星期一为第一天)")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在距下班还有:</font> " & CStr(cshort(hour(myend)-hour(Now()))) & "小时")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>现在距离大年30还有:</font> " & CStr(365-datetime.now.dayofyear()) & "天")
Response.Write("<br>")
Response.Write("<font size=3 color=#FF6600>今年是建国:</font> " & CStr(Year(Now())-Year(star)) & "周年")
Response.Write("<br>")
Response.Write("<font size=3 color=#006600>今天是一年中的第:</font> " & datetime.now.dayofyear() & "天")
Response.Write("<br>")
%>
这是什么错误啊!