
154 Cal.App.2d 732 (1957)
ALBERT W. STONEHOCKER, Appellant,
v.
CHARLIE CASSANO et al., Respondents.
Civ. No. 22091. 
California Court of Appeals. Second Dist., Div. Two.  
Oct. 28, 1957.
 Joseph Henry Wolf, Mildred Gilmore and Leonard M. Kaye for Appellant.
 Manuel J. Avila and Joseph L. Ventress for Respondents.
 MOORE, P. J.
 Appellant sued to rescind his purchase of 840 shares of A & D Trucking Company from Price Armstrong and 420 shares of the same company from Charlie Cassano for the sums of $3,000 and $767 respectively. The court found against him and entered judgment in favor of respondents on their cross-complaint for the unpaid balance of the purchase price of the stocks as evidenced by his promissory notes and for counsel's fees and costs.
 In demanding a reversal of the judgment, appellant contends that his contract of purchase is void by reason of the statutory inhibition of the sale of corporate stock contrary to the terms of the permit of the Corporation Commissioner. Contemporaneously with the deposit with the escrow agent of the permit for the issuance of the corporate shares, they were placed in escrow with Attorney Harry Williams. Prior to November 25, 1953, the parties made their agreement of purchase and sale. After that they visited the office of Harry Williams who explained to them the terms of the escrow and the law applicable to a transfer of escrowed stock. Having left Mr. Williams' office, appellant on that same day paid to Cassano $50 on account of the 420 shares and accepted a receipt therefor. On December 8 he advanced $250 to Armstrong. The latter sum was to be deducted from the sum to be paid for Armstrong's shares. The commissioner's permit specifically provided "that the owner or persons entitled to said shares shall not consummate a sale or transfer *734 of said shares, or any interest therein, or receive any consideration therefor, until the written consent of said Commissioner shall have been obtained so to do." By reason of the fact that the commissioner did not issue his consent to the transfer of the shares to appellant until December 18, the latter contends that the contract of sale was tainted by the illegality of the payment of the $50 and the loan of the $250. But respondents contend that Mr. Williams, as the escrow holder of the stock, had explained the requirements of the permit; that respondents could not sell or assign the shares or receive consideration for sale of the stock until the commissioner had consented to such transfer and assignment; but that plaintiff could and did waive any illegality in the transaction, and the delivery of promissory notes for the purchase price after the commissioner of corporations had consented to the transfer constituted an independent valid purchase of the shares, thus making the notes enforceable.
 Through the escrow holder, the stock was endorsed by respondents, the consent to the transfer was obtained and the certificates were delivered in escrow. Also, after the commissioner's consent had been issued, the notes of appellant were executed and delivered to respondents. The note to Cassano was for the full purchase price. The note to Armstrong was for $2,750, which was $250 less than the agreed purchase price, the $250 previously advanced to Armstrong being thereby credited upon the price.
 The grounds alleged for an annulment of the sale of the shares were: (1) respondents' fraud in having falsely represented to appellant that they would deliver the stock to appellant when the permit had been issued; (2) said stock was worth $10 per share; (3) they did not intend to deliver the shares, and (4) they were never delivered. The court found against appellant upon such allegations. The complaint also contained a common count directed at each defendant. [1] Respondents are reminded that despite the allegations of a complaint for rescission on the ground of fraud in the inducement of the contract for the sale of corporate shares, where the parties have adopted the theory that the action was founded upon the nullity of the contract by reason of the sale's having been made in violation of the permit and they have proceeded upon that theory and a judgment has been derived and entered in favor of the respondents, the judgment will be treated as though the action had been instituted originally on the ground of the nullity of the contract of *735 purchase. [2] It is settled law that where the parties and the court proceed throughout the trial upon a theory that a certain issue is presented for adjudication, both parties are thereafter estopped from claiming that no such issue was in controversy even though it was not actually raised by the pleadings. (Miller v. Peters, 37 Cal.2d 89, 93 [230 P.2d 803]. Cf. Vaughn v. Jonas, 31 Cal.2d 586, 605 [191 P.2d 432]; Cockerell v. Title Ins. & Trust Co., 42 Cal.2d 284, 288 [267 P.2d 16].) [3] Moreover, the common count is sufficient to sustain recovery of money paid upon a purchase which violates an outstanding permit. (Graner v. Hogsett, 84 Cal.App.2d 657 [191 P.2d 497]; Stallman v. Schwartz, 76 Cal.App.2d 406 [173 P.2d 388]; Smith v. Randall, 51 Cal.App.2d 195 [124 P.2d 334].)
 [4] The Corporate Securities Act (Corp. Code,  25000 et seq.) forbids the sale of any security or the negotiation for its sale unless the sale is first authorized by the commissioner of corporations.  [fn. *] Respondents do not deny or attack the statute but claim that it is legislation designed to protect a special class, i.e., purchasers of stock, and contend that a purchaser may waive the advantage of a law intended solely for his benefit. (Civ. Code,  3513.) [5] But a sale includes a contract of sale, an attempt to sell, an option of sale or an offer to sell. (Bourke v. Frisk, 92 Cal.App.2d 23, 27 *736 [206 P.2d 407].) [6] Where a statute prohibits or attaches a penalty to the doing of an act, the act is void even though the statute does not expressly pronounce it so and it is immaterial whether the forbidden act is malum prohibitum or malum in se. (Smith v. Bach, 183 Cal. 259, 262 [191 P. 14]; Duntley v. Kagarise, 10 Cal.App.2d 394, 397 [52 P.2d 560].) [7] The imposition by statute of a penalty implies a prohibition of the act referred to and a contract founded upon such act is void. (Ibid; Gridley v. Tilson, 202 Cal. 748, 753 [262 P. 322].)
 In Bourke v. Frisk, supra, the court directed the defendant to pay $4,000 with interest as restitution. That sum had been paid to the defendant's decedent for shares of stock sold by deceased before a permit had been issued. It was stipulated at the trial that the permit was issued May 29, 1946. It was shown to be in actual existence at the time of the delivery of the shares to plaintiff, June 1. But the money was paid for them on March 10, 1946, or two months and 19 days prior to the issuance of the permit. By reason of the fact that no permit had been issued March 10, 1946, when the money was paid, the sale was a violation of the law, and therefore illegal and void. The defendant attempted to argue that while the transaction of March 10 was a void sale, yet by considering the acceptance of the offer on June 1, a new, binding agreement was accomplished because there was a permit then in existence. That is not true. The subsequent conduct of the parties did not give validity to the sale because the actual delivery of the shares grew immediately out of the previous illegal transaction of March 10. (See Miller v. California Roofing Co., 55 Cal.App.2d 136, 141 [130 P.2d 740].) Every person who in any respect wilfully violates a permit of the commissioner is guilty of a public offense. (Corp. Code,  26104, subd. (f).) [8] The subsequent conduct of the parties does not give validity to the sale made in violation of the law. [9] If an agreement grows immediately out of an illegal act, a court will not lend its aid to enforce it. (Bourke v. Frisk, supra; Miller v. California Roofing Co., 55 Cal.App.2d 136, 141 [130 P.2d 740].)
 According to the evidence produced by respondents the parties to this action were in pari delicto, thus rendering applicable Domenigoni v. Imperial Live Stock & Mtg. Co., 189 Cal. 467, 475 [209 P. 36]; Wells v. Comstock, 46 Cal.2d 528, 531-532 [297 P.2d 961]; Bourke v. Frisk, supra, 92 Cal.App.2d 23, 28. If this evidence be accepted, neither party to the *737 action is entitled to recover. However, plaintiff's evidence, if found upon a new trial to be credible, would leave him in position to rescind the transaction and recover the moneys paid by him to defendants.
 Reversed.
 Fox, J., and Ashburn, J., concurred.
  25500. No company shall sell any security of its own issue, except upon a sale for a delinquent assessment against the security made in accordance with the laws of this State, or offer for sale, negotiate for the sale of, or take subscriptions for any such security, until it has first applied for and secured from the commissioner a permit authorizing it so to do.
  25508. The commissioner may impose conditions requiring the deposit in escrow of securities, the impounding of the proceeds from the sale thereof, limiting the expense in connection with the sale thereof, the waiver of assets and dividends by the holders of promotional securities, and such other conditions as he deems reasonable and necessary or advisable for the protection of the public and the purchasers of the securities.
  26104. Every officer, agent or employee of any company and every other person, who does any of the following acts is guilty of a public offense punishable by imprisonment in a state prison not exceeding five years, or in a county jail not exceeding two years, or by a fine not exceeding five thousand dollars ($5,000), or by both such fine and imprisonment: ...
 (f) In any respect wilfully violates or fails to comply with any provision of this division, or wilfully violates or fails, omits, or neglects to obey, observe, or comply with any order, permit, decision, demand, or requirement, or any part or provision thereof, of the commissioner under this division.
NOTES
[fn. *]  *. Corporations Code: [Stats. 1949, ch. 384,  1.]
