//回复留言
protected void lbtn_Reply_Click(object sender, EventArgs e)
{
LinkButton myL = (LinkButton)sender;//回复按钮本来就是LinkButton
int Index = ((DataListItem)(myL.NamingContainer)).ItemIndex;//获得当前行的行号
Panel pl = (Panel)DataList1.Items[Index].FindControl("Panel2");
pl.Visible = true;//显示回复留言
string id = ((Label)DataList1.Items[Index].FindControl("lab_id")).Text.ToString();//lab_id是datalist中的一个保存id的label
string Sender = ((Label)DataList1.Items[Index].FindControl("lab_sender")).Text;
((HiddenField)(pl.FindControl("HiddenField1"))).Value = id;
pl.Focus();
}