Header database vaue in repeater

sh su 1 Reputation point
                  DataSet dsk = ORSQLSelectRecord("SELECT * FROM cust.TEC_abc");

            Repeater3.DataSource = dsk;
          Session["dsek"] = dsk;

           protected void OnItemDataBound(object sender, RepeaterItemEventArgs e)

        if (e.Item.ItemType == ListItemType.Header)

           Label rlable1 = e.Item.FindControl("BBF9") as Label;
            System.Data.DataRowView data = e.Item.DataItem as System.Data.DataRowView;
            rlable1.Text =data["BUCKET_BF"].ToString();

A set of technologies in the .NET Framework for building web applications and XML web services.
3,318 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,071 Reputation points

    Hi @sh su ,
    I tested your codes and the error is DataRowView data is null. And you shouldn't use Eval in the headertemplate. I have write the methods in your another thread.You could refer to that thread.
    Best regards,
    Yijing Sun

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments