/ Published in: C#
Get number of records in DataTable when calling a method with ObjectDataSource.
Expand |
Embed | Plain Text
protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e) { if (e.Exception == null) { DataTable dt = (DataTable)e.ReturnValue; if (dt != null) TotalLabel.Text = dt.Rows.Count.ToString(); else TotalLabel.Text = "0"; } }
You need to login to post a comment.
