Return to Snippet

Revision: 11034
at January 21, 2009 08:17 by leonbda


Initial Code
// total label
protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.Exception == null)
        {
            List<ActualGroup> DPcount = (List<ActualGroup>)e.ReturnValue;
            if (DPcount != null && DPcount.Count > 0)
                TotalLabel.Text = DPcount.Count.ToString();
            else
                TotalLabel.Text = "0";
        }
    }

Initial URL


Initial Description
Get number of record from ObjectDataSource if method returns ListT object.

Initial Title
ListT - count records from ObjectDataSource

Initial Tags


Initial Language
C#