Gaurav Raj

Gaurav Raj

  • NA
  • 475
  • 89.4k

when i click comments button than more comments are add

Sep 16 2017 10:01 AM
when i click comments button than more comments are add
in specific location
this is my code
it works but this insert is top row of datalist
protected void TotalComment_Click1(object sender, EventArgs e)
{
string Id = ((Button)sender).CommandArgument;
CommentsProcedureResult cr = new CommentsProcedureResult();
foreach (DataListItem dli in DataList1.Items)
{
DataList text = (DataList)dli.FindControl("DataList2");
Button btn = (Button)dli.FindControl("BtnViewpre");
btn.Visible = true;
int bid = Convert.ToInt32(Id);
var q1 = cs.da.CommentsProcedure(bid).OrderByDescending(oo => oo.C_Id).Take(6).Reverse();
text.DataSource = q1;
text.DataBind();
break;
}
} 
please help me guys thankyou

Answers (1)