private void SavePO() { bool boRetValuePO = false; string stIDs = ""; foreach (DataListItem item in lstPO.Items) { HtmlInputCheckBox chkList = (HtmlInputCheckBox)item.FindControl("chkList"); if (chkList != null) { if (chkList.Checked == true) { stIDs += chkList.Value + ","; boRetValuePO = true; } } } if (boRetValuePO) { PO clsPO = new PO(); clsPO.UpdatePaymentStatus(POPaymentStatus.ForProcessing, stIDs.Substring(0, stIDs.Length - 1)); clsPO.CommitAndDispose(); } }