
661 N.E.2d 541 (1996)
277 Ill. App.3d 953
214 Ill.Dec. 687
Joseph W. KEATING, Plaintiff-Appellant,
v.
The ESTATE OF Robert GOLDING; Winston & Strawn, a partnership; Louis Allocco; Joseph Marrin; Deep Lake Shores Associates, an Illinois Limited partnership; Lasalle National Bank, as Trustee Under Trust # XX-XXXXX-XX; and A & M Sunrise Construction Co., an Illinois Corporation, Defendants-Appellees.
No. 1-94-0272.
Appellate Court of Illinois, First District, Sixth Division.
February 9, 1996.
Nunc Pro Tunc December 15, 1995.
*542 Michael W. Rathsack, Chicago (Arthur S. Gold and Michael W. Rathsack, of counsel), for appellant.
Butler, Rubin, Saltarelli & Boyd, Chicago, for Winston & Stawn and Estate of Robert Golding.
Donald A. Tarkington and Jennifer Friedes of Novack and Macey, Chicago, for Deep Lake Shores Associates.
Justice EGAN delivered the opinion of the court:
The plaintiff, Joseph W. Keating, is a real estate developer. He claims that in 1974 he entered into an oral partnership with the defendants, Louis Allocco, Joseph Marrin and Robert Golding (since deceased and at the time an attorney with the defendant Winston & Strawn) for the purpose of developing a parcel of land in Lake Villa, Illinois, now known as "Deep Lake Hermitage." In 1984, he filed a five count complaint, which contained as its primary claim his allegation that Golding, Allocco and Marrin breached their fiduciary duties under the agreement after they excluded him from participation in the syndication of Deep Lake Hermitage and by failing to reimburse him for money he had spent to acquire options on the land on which Deep Lake Hermitage is situated. The complaint also alleged fraud in the inducement against Golding, Allocco and Marrin; sought specific performance of the partnership agreement; sought a constructive trust over any proceeds from the sale of Deep Lake Hermitage; and charged Golding and Winston & Strawn with legal malpractice. The trial judge dismissed the entire complaint pursuant to the defendants' motion under section 2-615 of the Code of Civil Procedure (735 ILCS 5/2-615 (West 1992)), ruling that the partnership agreement was unenforceable in that its core purpose was to conceal the plaintiff's participation in the development of Deep Lake Hermitage in violation of disclosure regulations of the United States Department of Housing & Urban Development (HUD).
The plaintiff's third amended complaint alleges that the development of Deep Lake Hermitage was to be financed through the Illinois Housing Development Authority (IHDA) and the Federal Housing Authority (FHA). Under regulations issued by HUD, in order to obtain such financing for any development project, all "principals" must obtain a formal approval from HUD, referred to in the industry as "2530 clearance," after filing a certificate detailing their prior participation in projects financed by FHA loans. (24 C.F.R. secs. 200.210, 200.217(a)(1), 200.218.) A principal is "[a]n individual * * * proposing to participate, or participating, in a project as sponsor, owner, prime contractor, Turnkey Developer, [or] management agent." (24 C.F.R. sec. 200.215(e)(1).) If the principal is a corporation, "each stockholder having a 10 percent or more interest" is also a principal. (24 C.F.R. sec. 200.215(e)(2).) The purpose of the 2530 clearance process is to enable HUD to ensure that loans it insured would be paid by the principals. Thus, principals were required to certify that they had not defaulted on prior loans or other HUD obligations (24 C.F.R. sec. 200.219(a)(2)(i)-(iv)), had not been convicted of felonies (section 200.219(a)(2)(v)) and, germane to this litigation, "not been suspended, debarred, or otherwise restricted * * * from doing business with [any] department or agency of the federal government." *543 (24 C.F.R. sec. 200.219(a)(2)(vi).) Each principal must also certify that he has disclosed all other principals. 24 C.F.R. secs. 200.219(a)(3), 200.219(b).
The plaintiff's complaint alleges that sometime in 1974, his attorney, Golding, recommended that he inspect the Deep Lake Hermitage land. The plaintiff learned that the land was for sale and available for development. At the time, however, the plaintiff was under a disability such that he could not obtain 2530 clearance, and hence could not participate as a principal in IHDA and FHA financed projects. Golding suggested that the plaintiff meet with him and Allocco to discuss the formation of a partnership to develop Deep Lake Hermitage. The two defendants knew that the plaintiff lacked 2530 clearance; however, the plaintiff was the only one of the three who possessed the expertise and the equity funds to develop Deep Lake Hermitage.
The plaintiff alleged that the defendants met with him to suggest methods "of structuring the development of the Property so that Plaintiff could eventually participate," despite his lack of clearance. According to the complaint the three men "agreed that a partnership would be formed [among them] and with the inclusion of an additional partner, Marrin. Said partnership would take those steps necessary to develop this Property." The complaint further stated that when the plaintiff received his 2530 clearance, "Plaintiff was to obtain reimbursement from Golding, Marrin, and Allocco for any disbursements he made on this Property on behalf of the partnership, as well as a third of the syndication proceeds for his work as the developer." The remaining syndication proceeds would benefit AIMCO, a corporation to be formed by Golding, Allocco, and Marrin."
In 1975, the individual defendants incorporated and became shareholders in AIMCO. When the plaintiff received his 2530 clearance, he was to become a 25% shareholder in AIMCO. The plaintiff alleged that, in the belief that he would obtain 2530 clearance and in reliance on the foregoing agreements as well as "on Golding's representations that Plaintiff's interests as a shareholder in AIMCO and as a partner for Golding, Allocco and Marrin were being properly documented and that these entities were the best way to legally structure the transaction," he began the development of the property. The Plaintiff spent $57,000 to obtain options on the property. He also hired architects and engineers; met with local officials about zoning; and "provided and coordinated other services."
In further reliance on the alleged partnership agreement, the plaintiff assigned his option to purchase the property to AIMCO. Because the plaintiff had not yet received his 2530 clearance, the partners decided that AIMCO would apply to FHA and IHDA for financing. The plaintiff alleges that he did not try to conceal his involvement in the project from HUD. Although the complaint does not allege a specific date when the applications for financing were filed, the plaintiff continued to seek 2530 clearance, and by June 30, 1978 at the latest, HUD was aware of his participation in Deep Lake Hermitage. The plaintiff did not receive his 2530 clearance until August 1980. Subsequently, the plaintiff demanded of Golding, Allocco and Marrin that they honor the partnership agreement by reimbursing him for his expenditures and permitting him to participate in Deep Lake Hermitage as an AIMCO shareholder and to receive his share of the syndication proceeds. They refused.
Plaintiff further alleged that Golding, Allocco and Marrin placed the property in trust with the defendant LaSalle National Bank. Later, Golding, Allocco and Marrin conveyed the beneficial interest of the trust to the defendant Deep Lake Shores Associates (Deep Lake), a limited partnership formed by Golding, Allocco and Marrin, but expanded to include other individuals not named in this lawsuit. Finally, on or about October 31, 1984, Deep Lake sold 99.8% of its interest in Deep Lake Hermitage to National Partnership Investments Associates, III (NPIA), a California limited partnership which is not a party to this litigation. The proceeds of the sale were distributed to the partners of Deep Lake. As part of the sale agreement, AIMCO and the defendant A & M Sunrise Construction Company (yet another Allocco and *544 Marrin concern) indemnified NPIA against any liability resulting from claims by the plaintiff.
In granting judgment on the pleadings, the trial judge ruled that (1) the plaintiff's "activities [and] performance in preparation of the development of Deep Lake property were that of a principal"; (2) the plaintiff and the individual defendants entered the partnership for the purpose of enabling the plaintiff to participate in the development of Deep Lake Hermitage as an undisclosed principal in violation of 24 C.F.R. section 200.218; and (3) the plaintiff knew that the partnership contemplated an illegal purpose. As a result, the alleged agreement was unenforceable. The plaintiff contends that he has alleged facts that, if proved, establish that he believed the partnership agreement was legal and, therefore, enforceable.
This court reviews de novo the dismissal of a complaint, examining whether there exists any set of facts which, if proved, supports a cause of action under Illinois law. (Mitchell v. Skubiak (1993), 248 Ill.App.3d 1000, 1004, 188 Ill.Dec. 443, 618 N.E.2d 1013.) All well-pleaded allegations of fact are assumed to be true and all reasonable inferences must be drawn in a light most favorable to the plaintiff. T & S Signs, Inc. v. Village of Wadsworth (1994), 261 Ill. App.3d 1080, 1083, 199 Ill.Dec. 467, 634 N.E.2d 306.
The trial judge dismissed the plaintiff's complaint because he concluded that it alleged a contract which had as its purpose an illegal act: the intentional avoidance of HUD's requirement that all principals in a development be disclosed. Under Illinois law, a court will refuse to enforce a contract only when the purpose of the contract violates the law. (Mani Electrical Contractors v. Kioutas (1993), 243 Ill.App.3d 662, 664, 183 Ill.Dec. 519, 611 N.E.2d 1167.) Indeed, that a contract, in its performance, violates some law does not render it unenforceable. (Mani, 243 Ill.App.3d at 667, 183 Ill.Dec. 519, 611 N.E.2d 1167.) In all cases when a contract is asserted to be unenforceable, the court inquires whether the contract "necessarily contemplated an illegal bargain, not whether an otherwise legal contract is performed in a manner which involves a violation of the law." (Mani, 243 Ill.App.3d at 667, 183 Ill.Dec. 519, 611 N.E.2d 1167; Midwest Environmental Consulting & Remediation Services, Inc. v. Peoples Bank of Bloomington (1993), 251 Ill.App.3d 256, 261, 189 Ill.Dec. 501, 620 N.E.2d 469.) Whether the contract is unenforceable against the plaintiff because it necessarily contemplated an illegal bargain we need not decide because we find that the complaint should not have been dismissed for another reason.
Initially, we must address Deep Lake's contention that we should affirm the judgment in its favor on a ground not relied upon by the trial judge: that the plaintiff's claim for the imposition of a constructive trust was legally insufficient for a variety of reasons. The plaintiff concedes much of Deep Lake's argument as it relates to the sufficiency, as stated in the third amended complaint, of his claim to a constructive trust, yet we agree with his contention that we should not affirm on this ground.
Although this court may affirm the trial judge's dismissal of the complaint on any ground in the record, even one not relied upon by the judge below (Material Service Corp. v. Department of Revenue (1983), 98 Ill.2d 382, 387, 75 Ill.Dec. 219, 457 N.E.2d 9), the supreme court has warned against so doing when it would have the effect of affirming on the basis of a correctable pleading defect. Thus, we should not deprive litigants of the opportunity to make an argument on an issue, particularly when that issue was not addressed in the trial court. (Geaslen v. Berkson, Gorov & Levin, Ltd. (1993), 155 Ill.2d 223, 230, 184 Ill.Dec. 385, 613 N.E.2d 702.) The proceedings below focused exclusively on the enforceability of the agreement allegedly entered into by the plaintiff and the individual defendants. Our review of the record reveals that the sufficiency of the plaintiff's claim to a constructive trust was not addressed. Thus, the plaintiff never had reason to amend that portion of his complaint to state an alternative theory of recovery, if there is one, against Deep Lake. Certainly, had the issue arisen below, the trial court would have granted leave to the plaintiff to *545 amend his complaint. (Geaslen, 155 Ill.2d at 230, 184 Ill.Dec. 385, 613 N.E.2d 702.) Particularly in light of our decision that the trial judge should have denied the defendants' motion for judgment, we will not cut off the plaintiff's right to do so on remand.
The defendants urge us to uphold the dismissal, focusing on the plaintiff's allegations that (1) he knew he was ineligible to receive a 2530 clearance; (2) without that clearance he could not apply for IHDA and FHA financing; (3) he possessed the sole expertise and equity funds to develop Deep Lake Hermitage; (4) AIMCO was formed to apply for financing; and (5) he took steps to develop the project. The defendants posit that the only reasonable inference to be drawn from the complaint is that the plaintiff, and consequently, we note, his attorney Golding and the other partners as well, intended to evade the HUD regulations by hiding the plaintiff's participation. Under the defendants interpretation of the law, they would retain the benefits of the illegal enterprise, but the plaintiff would not.[1]
However, the defendants' analysis, as well as the trial judge's ruling, omits reference to an allegation of the complaint crucial to the decision as to whether it can withstand a motion under section 2-615: that the plaintiff began to develop Deep Lake Hermitage on Golding's representations that he had structured the transaction in a legal manner. Clients may generally rely on the advice of counsel. (Sutton v. Mytich (1990), 197 Ill. App.3d 672, 679, 144 Ill.Dec. 196, 555 N.E.2d 93. See Jackson Jordan, Inc. v. Leydig, Voit & Mayer (1994), 158 Ill.2d 240, 252-53, 198 Ill.Dec. 786, 633 N.E.2d 627 (recognizing that clients hire lawyers for the purpose of relying on their advice).) Although the evidence may eventually bear out the defendants' position, a ruling on a motion for judgment under section 2-615 does not reach beyond the face of the pleading. (Carter v. New Trier East High School (1995), 272 Ill.App.3d 551, 553-54, 208 Ill.Dec. 963, 650 N.E.2d 657.) Here, the complaint alleges the plaintiff's belief in the legality of the partnership. That allegation must be taken as true. Because a party must enter into an agreement with an illegal bargain as his purpose for us to refuse to enforce it, the plaintiff need have alleged no more than he did to survive a section 2-615 motion premised upon the enforceability of the partnership. Based solely on the allegations in the complaint before us, we cannot conclude that the plaintiff knew the partnership was illegal. For this reason, the judge should have denied the motion for judgment on the pleadings; the judgment is reversed, and the cause is remanded for further proceedings.
Reversed and remanded.
ZWICK, P.J., and RAKOWSKI, J., concur.
NOTES
[1]  The defendants have filed an answer denying the allegation of the complaint that there was any agreement between them and the plaintiff.
