首页 新闻 会员 周边 捐助

我这个网站是什么问题啊 哪里的错误啊?

0
悬赏园豆:30 [已关闭问题] 关闭于 2008-12-19 13:51

 我把别的文件设置成起始页的时候运行都能显示出来当我把MoreListen.sapx文件设置成起始页的时候一运行出现了

我的moreListen.aspx的全部代码是

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MoreListen.aspx.cs" Inherits="MoreListen" %>

<%@ Register Src="UserWeb/end.ascx" TagName="end" TagPrefix="uc2" %>
<%@ Register Src="loginpage/login.ascx" TagName="login" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>听学联盟</title>
    <link href="css/top.css" type="text/css" rel="stylesheet" />
    <link href="css/css.css" type="text/css" rel="stylesheet" />
    <link href="css/footer.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="css/js.js" language="javascript"></script>

    <script type="text/javascript" src="css/newshuadong.js" language="javascript">
    </script>

</head>
<body>
<form id="fm" runat="server" method="post">
    <!--头部-->
    <div style="background: #fff; float: left; padding: 0 1px;">
      <uc1:login ID="Login1" runat="server" />
        <!--整体内容上部-->
        <div id="link">
            <div id="gyce">
                <p class="po">
                    <img src="images/txlm.gif" width="274" height="48" /></p>
                <p class="po1">
                    您现在的位置:<a href="pageindex.aspx">首页</a> >> <%=tt %>
                </p>
            </div>
            <div id="link_left">
                <div id="tpet">
                    <asp:DataList ID="DataList1" runat="server" RepeatColumns="1" OnItemDataBound="DataList1_ItemDataBound">
                        <ItemTemplate>
                            <div id="felat" class="magi">
                                    <h1>
                                        <%# DataBinder.Eval(Container.DataItem,"catename")%>
                                    </h1>
                                <ul>
                                    <li>
                                        <asp:DataList ID="xueqian" runat="server">
                                            <ItemTemplate>
                                                ·<a href='shownews.aspx?cb=<%# DataBinder.Eval(Container.DataItem,"ID")%>&al=<%=nid %>' target="_self">
                            <%# DataBinder.Eval(Container.DataItem, "Title").ToString().Length > 14? DataBinder.Eval(Container.DataItem, "Title").ToString().Substring(0,14) + "..." : DataBinder.Eval(Container.DataItem, "Title").ToString()%>
                                                    </a>
                                            </ItemTemplate>
                                        </asp:DataList></li></ul>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                     <span class="spar">
                        <img src="images/d024.gif" width="267" height="5" /></span>
                </div>
              
            </div>
            <div id="link_right">
                <div id="gytx">
                    <asp:DataList ID="DataList2" runat="server" Height="79px" RepeatColumns="1" Width="100%">
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" class="route" width="100%">
                                <tr>
                                    <td align="center" height="24" style="width: 24px">
                                        <img height="9" src="images/event_icon.gif" width="9" /></td>
                                    <td align="left" height="24" style="font-size: 13px; border-bottom: 1px dashed #ccc;">
                                        <a class="route" href='shownews.aspx?cb=<%# DataBinder.Eval(Container.DataItem,"ID")%>&al=<%=nid %>'
                                            target="_blank">
                                            ·<%# DataBinder.Eval(Container.DataItem, "Title").ToString().Length > 25? DataBinder.Eval(Container.DataItem, "Title").ToString().Substring(0,25) + "..." : DataBinder.Eval(Container.DataItem, "Title").ToString()%>
                                        </a>
                                    </td>
                                    <td align="left" height="24" style="color: #099; border-bottom: 1px dashed #ccc;"
                                        width="16%">
                                        <%# DataBinder.Eval(Container.DataItem,"addtime","{0:yyyy年MM月dd日}")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:DataList><br />
                    <div id="gytx" style=" text-align:center;">
                    <asp:Label ID="TotalLbl" runat="server" Width="64px"></asp:Label><asp:Label ID="CurrentLbl"
                        runat="server" Width="88px"></asp:Label><asp:LinkButton ID="PreviousLB" runat="server"
                            CommandName="prev" OnCommand="LinkButton_Click"> 上一页</asp:LinkButton><asp:LinkButton
                                ID="NextLB" runat="server" CommandName="next" OnCommand="LinkButton_Click"> 下一页</asp:LinkButton>
                                </div>
                </div>
            </div>
        </div>
        <!--底部-->
        <div id="footer">
            <uc2:end ID="End1" runat="server" />
        </div>
    </div></form>
</body>
</html>
怎么改啊?

问题补充: 哪里有错误,哪个"="啊?怎么改啊?告诉我详细点哈我是才学.NET的 谢谢public class DBcon { /// <summary> /// DBcon 的摘要说明。 /// </summary> AccessBase Acc = new AccessBase(); // private static string db = ConfigurationSettings.AppSettings["conStr"]; public DBcon() { // // TODO: 在此处添加构造函数逻辑 // } // public static DataSet ExecutSelectsql(string sqlselect) { SqlConnection conn = DBManager.createConnection(); // SqlConnection conn = new SqlConnection(db); SqlDataAdapter sda = new SqlDataAdapter(sqlselect, conn); DataSet ds = new DataSet(); try { sda.Fill(ds); } catch (SqlException e) { throw new Exception(e.Message); } return ds; } public static int Excutsql(string sql) { int row = -1; SqlConnection conn = DBManager.createConnection(); SqlCommand cmd = new SqlCommand(sql, conn); try { conn.Open(); row = cmd.ExecuteNonQuery(); } catch (SqlException e) { throw new Exception(e.Message); } finally { cmd.Dispose(); conn.Close(); } return row; }你们要的是这个代码吗??这个就是图片上的代码 z在线等答案
初业惠的主页 初业惠 | 初学一级 | 园豆:150
提问于:2008-12-19 12:57
< >
分享
所有回答(6)
0

说得很清楚了,“=”附近有语法错误。

麦舒 | 园豆:452 (菜鸟二级) | 2008-12-19 12:59
0

老大,你应该贴 try 里面的代码,问题就出在那儿

码尔代夫iimax | 园豆:3138 (老鸟四级) | 2008-12-19 13:20
0

那个图再往上多截一点。。。

BB_Coder | 园豆:797 (小虾三级) | 2008-12-19 13:24
0

同意楼上。

West | 园豆:1095 (小虾三级) | 2008-12-19 13:27
0

明显你的SQL语句有问题

Gray Zhang | 园豆:17610 (专家六级) | 2008-12-19 13:28
0

这个应该是你的SQL语句问题,这种运行时错误一般都是有SQL语句语法错误引起的,如果你觉得你的SQL语法没问题,那你在Catch中相应的SQL语句处设置断点,跟踪一下,看看输出的SQL在运行时是不是由于某些查询数据等而造成了SQL的注入问题等

GUO Xingwang | 园豆:3885 (老鸟四级) | 2008-12-19 13:34
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册