本文来源:网站建设-网站制作|网络营销专家慧云科技-抢滩登陆2009-7-17 17:03:06
using System;
using System.Data;
using System.Collections;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;
public partial class Part_CommentList : System.Web.UI.UserControl
{
private string ArticleId = "";
protected void Page_Load( object sender, EventArgs e )
{
try {
ArticleId = Todo.Get( "aid", Request );
if( ArticleId == "" ) return;
ContentAccess ca = new ContentAccess( this, "TableName" );
DataTable dt = ca.Read( "[@ArticleId=" + ArticleId + "]", "name" );
if( dt == null || dt.Rows.Count < 1 ) {
lbMassage.Visible = true; Todo.DebugOut( "Part_CommentList 没有读取到数据" );
return;
}
lbMassage.Visible = false;
rptComList.DataSource = dt;
rptComList.DataBind();
} catch( Exception ex ) {
Todo.DebugOut( "加载 Part_CommentList 出现异常:" + ex.Message );
}
}
}