回 帖 发 新 帖 刷新版面

主题:[讨论]这是什么原因导致的

在一开始,这些代码可以正常在浏览器中显示,但是当我装了一个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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(mybir))
    Response.Write("<br>")
    response.write("<font size=3 color=#FF6600>今年是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(Year(Now())))
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>今年是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.today.year() & "年")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(Now()))
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF8745>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.now())
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>今天是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(month(now())) & "月")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>今天是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.today.month() & "月")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>今天是9月的第:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(day(now())) &"天")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>今天是9月的第:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.today.day() & "天")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(hour(Now())) & "时")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(hour(Now())) & "时" & CStr(minute(Now())) & "分" & CStr(second(Now())) & "秒")
    Response.Write("<br>")
        Response.Write("<font size=3 color=#006600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.now.hour() & "时")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.now.hour() & "时的" & datetime.now.minute() & "分")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>现在是:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.now.hour() & "时的" & datetime.now.minute() & "分" & datetime.now.second() & "秒")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>今天是一周的第:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(weekday(Now())) & "天(注:星期天为第一天)")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>今天是一周的第:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & datetime.now.dayofweek() & "天(注:星期一为第一天)")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>现在距下班还有:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(cshort(hour(myend)-hour(Now()))) & "小时")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>现在距离大年30还有:</font>&nbsp;" & CStr(365-datetime.now.dayofyear()) & "天")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#FF6600>今年是建国:</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & CStr(Year(Now())-Year(star)) & "周年")
    Response.Write("<br>")
    Response.Write("<font size=3 color=#006600>今天是一年中的第:</font>&nbsp;&nbsp;&nbsp;" & datetime.now.dayofyear() & "天")
    Response.Write("<br>")

%>

这是什么错误啊!

回复列表 (共4个回复)

沙发

这是ASP书写格式啊 !

板凳

是的!我是用ASP格式写的?
你能修改一下吗?我不知道是什么原因?

3 楼

vb.net可以这样写!
因为能用到asp语言!

4 楼

www.qq8080.com

我来回复

您尚未登录,请登录后再回复。点此登录或注册