/// <summary>
/// 统计某列的总值
/// </summary>
/// <param name="objName">Label控件名称</param>
/// <returns>总值</returns>
protected String GetTotal(String objName)
{
Label myLabel;
Int32 returnValue = 0;
for(Int32 i=0;i<DataList1.Items.Count;i++)
{
myLabel = (Label)DataList1.Items[i].FindControl(objName);
returnValue += Convert.ToInt32(myLabel.Text);
}
return returnValue.ToString();
}
/// 统计某列的总值
/// </summary>
/// <param name="objName">Label控件名称</param>
/// <returns>总值</returns>
protected String GetTotal(String objName)
{
Label myLabel;
Int32 returnValue = 0;
for(Int32 i=0;i<DataList1.Items.Count;i++)
{
myLabel = (Label)DataList1.Items[i].FindControl(objName);
returnValue += Convert.ToInt32(myLabel.Text);
}
return returnValue.ToString();
}