标题:”此网页上的问题可能使其无法正常显示或正常运行....“
只看楼主
microsystems
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-7-14
 问题点数:0 回复次数:2 
”此网页上的问题可能使其无法正常显示或正常运行....“
一打开这个网页就提示这个,几乎好多网页都没问题的,但是就是报错~ 希望大家给我点提示  我错哪了
[bo]“
此网页上的问题可能使其无法正常显示或正常运行....
行:2
char:1
错误:语法错误
代码:0
....
”[/bo]

代码如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admi_DutyTotalTime.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<html xmlns="http://www. >
<head runat="server">
    <title>Admi_DutyTotalTime</title>
   
     <META http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="../../Controls/Styles/Style.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src ="../../Controls/Scripts/Script.js"></script>
    <style type="text/css">
body {background-color:#e9f9ff;}
</style>
</head>
<body>
<div  id ="TopMenu" style="  width: 100%; height: 40px; font-size: 17pt; background:url(../../Images/csdnblog_navbg.gif) repeat-x center top " >
                          <th align="left" class="font_title" style="height: 40px " width="57%">
                            <img align="absBottom" src="../../Images/ico_Xp03.gif" style="width: 36px; height: 30px" /></th>
    学生值班时间统计 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
    &nbsp;
</div>
    <form id="form1" runat="server">
    <div>
        &nbsp;<table align="center" style="width: 90%; height: 40px">
            <tr>
                <td style="width: 100%; height: 40px; text-align: center">
                    <div id="title1" style="font-weight: bold; font-size: 18pt; background: url(../../Images/csdnblog_contentbg.gif) center top;
                        width: 100%; height: 40px">
                        值班时间统计(按周统计)</div>
                </td>
            </tr>
        </table>
        <table align="center" border="0" cellpadding="0" cellspacing="0" height="35" width="90%">
            <tbody>
                <tr>
                    <td style="height: 145px; text-align: center">
                        <div style="text-align: center">
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="90%" CellPadding="4" ForeColor="#333333" GridLines="None">
            <Columns>
                <asp:TemplateField HeaderText="编号">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex+1 %>"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="姓名">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("NewStuName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="学号">
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("NewStuNum") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="图示">
                    <ItemStyle Width="45%" BorderWidth="1px" HorizontalAlign="Left"></ItemStyle>
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/timetotal.gif" Height ="20" Width='<%# FormatTimeImage(FormatTimeCount(Convert.ToInt32(Eval("NewStuTimeTotal")))) %>' />
                    <%# FormatTimeCount(Convert.ToInt32(Eval("NewStuTimeTotal")))%>小时
                     
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#EFF3FB" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#2461BF" />
                                <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
                        &nbsp; &nbsp;
                    </div>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <br />
        <div style="text-align: center">
            &nbsp;</div>
        <br />
        <br />
        <br />
        &nbsp;</div>
    </form>
</body>
</html>




这个是CS代码:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using StaffManage.BusinessLogicLayer;
using StaffManage.DataAccessHelper;
using StaffManage.DataAccessLayer;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DutyTimeTotal();
        }
    }

 protected void DutyTimeTotal()
    {
        DUTY duty = new DUTY();
        DataSet DS_0 = new DataSet();
        DS_0 = duty.DutyTimeTotal();

        DataSet DS_1 = new DataSet();

        DataTable DT = new DataTable();

        DataColumn NewStuName = new DataColumn("NewStuName", Type.GetType("System.String"));
        DataColumn NewStuNum = new DataColumn("NewStuNum", Type.GetType("System.String"));
        DataColumn NewStuTimeTotal = new DataColumn("NewStuTimeTotal", Type.GetType("System.Int32"));

        DT.Columns.Add(NewStuName);
        DT.Columns.Add(NewStuNum);
        DT.Columns.Add(NewStuTimeTotal);

        DS_1.Tables.Add(DT);

        string stuname = "";
        int dutytime = 0;
        string stunum = "";
        int tmp = 0;
        foreach (DataRow DR in DS_0.Tables[0].Rows)
        {
            stuname = GetSafeData.ValidateDataRow_S(DR, "StuName");
            stunum = GetSafeData.ValidateDataRow_S(DR, "StuNum");
            dutytime = (Int32)GetSafeData.ValidataDataRow_B(DR, "DutyTime");
            int newtime = 0;
            switch (dutytime)
            {
                case 1: newtime = 2; break;
                case 2: newtime = 2; break;
                case 4: newtime = 4; break;
                case 8: newtime = 3; break;
            }

            bool isExist = false;
            for (int i = 0; i <= DS_1.Tables[0].Rows.Count - 1; i++)
            {
                if (DS_1.Tables[0].Rows[i]["NewStuNum"].ToString() == stunum)
                { isExist = true; tmp = i; }
            }

            if (isExist)
            {
                int temp = Convert.ToInt32(DS_1.Tables[0].Rows[tmp]["NewStuTimeTotal"])+newtime;
                DS_1.Tables[0].Rows[tmp]["NewStuTimeTotal"] = temp;
            }
            else
            {
                DataRow DR_0 = DT.NewRow();

                DR_0["NewStuName"] = stuname;
                DR_0["NewStuNum"] = stunum;
                DR_0["NewStuTimeTotal"] = newtime;
                DT.Rows.Add(DR_0);
            }

        }

        GridView1.DataSource = DS_1;
        GridView1.DataBind();  
    }

    protected int FormatTimeCount(int TimeCount)
    {
        return TimeCount;
    }
    protected int FormatTimeImage(int TTimeCount)
    {
        return (20 * TTimeCount);
    }
}
搜索更多相关主题的帖子: 网页 quot DTD 运行 dtd 
2008-05-17 00:46
skyland84
Rank: 2
等 级:新手上路
威 望:4
帖 子:544
专家分:0
注 册:2006-10-9
得分:0 
页面是可以显示 但是就是状态栏下有提示出错是么?
那可能是你的JS代码问题。这个问题要自己检查。

决定人生~
2008-05-18 00:40
microsystems
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-7-14
得分:0 
恩  我把所有代码都贴出来了的  没有错的嘛  但是它就报错~  急死我了~
2008-05-19 13:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-214688-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.161053 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved