62,050
社区成员
发帖
与我相关
我的任务
分享
protected void GuestBookDL1_ItemDataBound(object sender, DataListItemEventArgs e)
{
Button ReplyB = (Button)e.Item.FindControl("ReplyB");
if (ReplyB!=null)
{
ReplyB.Click += new EventHandler(ReplyB_Click);
}
}
void ReplyB_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
protected void GuestBookDL1_ItemDataBound(object sender, DataListItemEventArgs e)
{
int ArtId = Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "ArtId"));
DataList GuestBookDL2 = (DataList)e.Item.FindControl("GuestBookDL2");
if (GuestBookDL2!=null)
{
GuestBookDL2.DataSource = Article.GetDataTableRepley(ArtId);
GuestBookDL2.ItemCommand += new DataListCommandEventHandler(GuestBookDL2_ItemCommand);
GuestBookDL2.DataBind();
}
TextBox ReplyT = (TextBox)e.Item.FindControl("ReplyT");
Button ReplyB = (Button)e.Item.FindControl("ReplyB");
//if (ReplyB!=null)
//{
// ReplyB.Click += new EventHandler(ReplyB_Click);
//}
}
void GuestBookDL2_ItemCommand(object source, DataListCommandEventArgs e)
{
//throw new NotImplementedException();
if (e.CommandName=="ReplyI")
{
Response.Write("XXX");
}
}