protected void GetCodesByParentIdAndChildFieldName() { int parentLkpId = int.Parse(Request.Form[ParentLookupId]); string childFieldName = Request.Form[ChildLookupFieldName]; LookupCodeDa da = new LookupCodeDa(); DataTable lookupCodes = da.GetLookupCodesExcludingCodesByParentLookupId(parentLkpId, childFieldName); DataTable childNodes = da.GetChildCodesByLookupIdAndChildLookupName(parentLkpId, childFieldName); string codes = "{ \"codes\": " + GetOutputArray(lookupCodes) + ", \"childCodes\": " + GetOutputArray(childNodes) + " }"; Response.Write(codes); }