帮我看看有什么错误啊
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace GuestBook
{
/// <summary>
/// View 的摘要说明。
/// </summary>
public class View : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Repeater Message;
int pageSize,recordCount,pageCount,currentPage;
protected System.Web.UI.WebControls.Label lbRecordCount;
protected System.Web.UI.WebControls.Label lbCurrentPage;
protected System.Web.UI.WebControls.Label lbPageCount;
protected System.Web.UI.WebControls.LinkButton butPrev;
protected System.Web.UI.WebControls.LinkButton butNext;
protected System.Web.UI.WebControls.DropDownList dlsPageIndex;
OleDbConnection conn;
private void Page_Load(object sender, System.EventArgs e)
{
OleDbConnection conn;
OleDbCommand comd;
string sql;
DataSet ds;
OleDbDataAdapter da;
string conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath(".") + "..\\Data\\data.mdb";
conn = new OleDbConnection(conStr);
sql = "Select * from GuestBook order by date DESC";
da = new OleDbDataAdapter(sql,conn);
ds = new DataSet();
da.Fill(ds,1,5,"Message");
Message.DataSource = ds;
Message.DataMember = "Message";
Message.DataBind();
conn.Close();
}
}
}
<%@ Page Language="c#" AutoEventWireup="false" src="2.aspx.cs" Inherits="GuestBook.View"%>
<html>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<ASP:Repeater id="Message" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr style="background-color:DFA894">
<th>
Title
</th>
<th>
Title ID
</th>
<th>
Type
</th>
<th>
Publisher ID
</th>
<th>
Price
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="background-color:FFECD8">
<td>
<%# DataBinder.Eval(Container.DataItem,"Photo")%>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Photo") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Photo") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Photo") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Photo", "$ {0}") %>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:Repeater>
</body>
</html>
改了。
不过运行 没有信息啊出现啊