
152 Cal.App.3d 945 (1984)
200 Cal. Rptr. 1
REGINALD DE LA CUESTA et al., Petitioners,
v.
THE SUPERIOR COURT OF ORANGE COUNTY, Respondent; FIDELITY FEDERAL SAVINGS AND LOAN ASSOCIATION, Real Party in Interest. THEODORE D. BENADERET et al., Petitioners,
v.
THE SUPERIOR COURT OF ORANGE COUNTY, Respondent; FIDELITY FEDERAL SAVINGS AND LOAN ASSOCIATION, Real Party in Interest.
Docket Nos. 30849, 30850.
Court of Appeals of California, Fourth District, Division Two.
March 7, 1984.
*947 COUNSEL
Fred Crane, Alan L. Green and Michael V. Hesse for Petitioners.
No appearance for Respondent.
Leff & Stephenson, Leff & Mason, Andrew E. Katz, Steven G. Polard and Walter L. Blackwell III for Real Party in Interest.
OPINION
KAUFMAN, J.
These are consolidated original proceedings in mandate to compel the Orange County Superior Court to determine the prevailing party and amount of reasonable attorney fees pursuant to Civil Code section 1717 in unsuccessful actions to enjoin trust deed foreclosure sales. This court issued alternative writs, but we have concluded that petitioners have misconceived their remedy and lack the necessary beneficial interest requisite to issuance of a peremptory writ. We shall therefore deny issuance of the peremptory writ and discharge the alternative writ heretofore issued.
For purposes of decision the facts may be greatly simplified. Petitioners were unconsented-to nonassuming grantees of parcels of real property which stood as security by way of deeds of trust for loans made earlier by Fidelity Federal Savings and Loan Association, a federally chartered savings and loan. When Fidelity Federal learned of the transfer of the respective properties to petitioners it exercised its due-on-sale rights pursuant to due-on-sale provisions in the deeds of trust. (Reference to Fidelity Federal shall include where the context is appropriate both Fidelity Federal Savings and Loan Association and Gateway Mortgage Company, the trustee named in the deeds of trust. Trustee shall include both the trustee and beneficiary where the context permits.)
The petitioners commenced actions to enjoin the threatened nonjudicial foreclosures resulting from the exercise of the due-on-sale clauses. In due course the trial court granted summary judgments to Fidelity Federal and petitioners appealed to this court. The Benadaret appeal was stayed while the de la Cuesta case was decided, first by this court and then by the United States Supreme Court. In Fidelity Federal Sav. & Loan Assn. v. De La Cuesta (1982) 458 U.S. 141 [73 L.Ed.2d 664, 102 S.Ct. 3014] the Supreme Court held the state law represented by Wellenkamp v. Bank of America (1978) 21 Cal.3d 943 [148 Cal. Rptr. 379, 582 P.2d 970] was preempted by federal law so that it was inapplicable to federal savings and loan associations, *948 with the result that Fidelity Federal had the legal right to exercise the due-on-sale provisions in its deeds of trust.
Following remand to this court we filed opinions in both cases on March 15, 1983, affirming the summary judgments, but in each case ordering that "[i]n the interests of justice the parties shall bear their own respective costs on appeal." This provision was repeated in the remittitur in each case.
On July 22, 1983, petitioners filed a motion in each case requesting the court to declare defendant Fidelity Federal the prevailing party and to determine a reasonable amount for attorney fees pursuant to Civil Code section 1717.[1]
In due course petitioners' motions were denied, and these writ proceedings followed.
Lest it continue a mystery why a party would seek to compel a court to award attorney fees to his adversary, it might be well to explain that petitioners anticipate that the nonjudicial foreclosure proceedings based on Fidelity Federal's exercise of the due-on-sale provisions in its deeds of trust, which were enjoined or stayed during the pendency of the appeals, will now proceed and that Fidelity Federal will add to the total of principal, interest and costs necessary to pay off the loan, a very substantial and judicially unreviewed amount for attorney fees incurred by the trustee in enforcing its right to foreclose. (1) The reason they moved the trial court to declare Fidelity Federal the prevailing party and fix a reasonable amount for Fidelity Federal's attorney fees in the action was to obtain judicial scrutiny of the amount of attorney fees to be added by the trustee to the other amounts necessary to pay off the loan secured by the deed of trust.
The recitation of petitioner's purpose, however, discloses that its fundamental premise is faulty. The amount of attorney fees that might be fixed *949 as reasonable by the court for the trustee's defense in the action to enjoin foreclosure would not necessarily be coextensive with the amount of attorney fees the trustee could properly claim as reasonable attorney fees in connection with its overall effort to foreclose. Indeed, the trustee's failure to seek and recover any attorney fees at all in the injunction action would not preclude its adding its reasonable attorney fees to the amount of the debt secured by each deed of trust.
These cases are perfect illustrations of the point. Fidelity Federal did not seek attorney fees in the trial court. It put on no proof of its attorney's services or their value nor did it file a memorandum of costs or any motion for attorney fees under Civil Code section 1717. Section 1717 provides that attorney fees recoverable under the section are recoverable as costs, and having failed to file either a memorandum of costs including a request for and evidentiary support for attorney fees or a motion for attorney fees accompanied by evidentiary support pursuant to Civil Code section 1717, and the judgments having become final, Fidelity Federal cannot now recover attorney fees in the actions. However, their rights concerning attorney fees under their deeds of trust remain intact. Petitioners appear to assert that because Fidelity Federal failed to assert the trust deeds' attorney fee provisions in the actions to enjoin foreclosure, its right to attorney fees must depend exclusively on section 1717, but that is simply not the case.
What might be the situation had Fidelity Federal sought judicial foreclosure, asserting its rights under its deeds of trust, we need not decide. Here, only the due-on-sale provision of the deed of trust was asserted by Fidelity Federal in defense of petitioners' actions to enjoin foreclosure. It therefore did not impermissibly split a claim or cause of action in failing to assert its rights to attorney fees in the injunction suits, and its foreclosure rights under the deed of trust, including its attorney fee rights, are in no way impaired. As we observed in Saucedo v. Mercury Sav. & Loan Assn. (1980) 111 Cal. App.3d 309, 315 [168 Cal. Rptr. 552]: "While the nonassuming grantee would not have been personally liable for payment of attorney fees under the note and deed of trust, the trustee and/or beneficiary would have been entitled to attorney fees under the provisions of the deed of trust had they prevailed, and these fees would have become part of the debt secured by the deed of trust. To prevent foreclosure of his interest, the nonassuming grantee would have had to pay off the secured debt, including the attorney fees, by refinancing or otherwise."
It is true that Civil Code section 1717 provides that the court shall determine the prevailing party and ascertain a reasonable amount for the prevailing party's attorney fees "upon ... motion by a party," which suggests either party. However, in the absence of any showing of the services performed and their value, it is doubtful the court could properly make orders *950 for attorney fees. (Cf. In re Marriage of Cueva (1978) 86 Cal. App.3d 290, 301 [149 Cal. Rptr. 918].) In any event, however, in view of the fact that the amount of such orders would not necessarily be coextensive with the amount Fidelity Federal could properly claim on account of its overall reasonable attorney fees in connection with the nonjudicial foreclosure, it is apparent that petitioners have misconceived their remedy. They must await Fidelity Federal's including a figure for its attorney fees in the amount necessary to repay the debt in each instance. If the amount demanded is deemed unreasonable, petitioners will be at liberty to institute a new action for declaratory relief and/or injunction in which they will be entitled to attorney fees if they prevail. (See Saucedo v. Mercury Sav. & Loan Assn., supra, 111 Cal. App.3d at pp. 314-315.)
(2) Because the orders sought in the trial court would not provide petitioners effective relief in any event, it is also apparent petitioners lack the beneficial interest requisite to issuance of a prerogative writ. (See Code Civ. Proc., § 1086; Parker v. Bowron (1953) 40 Cal.2d 344, 351 [254 P.2d 6]; Ault v. Council of City of San Rafael (1941) 17 Cal.2d 415, 417 [110 P.2d 379].) As stated in Ault: "The granting of a writ of mandate is discretionary and it will be granted only where necessary to protect a substantial right and only when it is shown that some substantial damage will be suffered by the petitioner if said writ is denied."
One further point requires mention. Petitioners apparently contend that the order contained in the appellate judgment in each case that the parties should bear their own costs on appeal in the interests of justice included attorney fees. In view of the independent vitality of the attorney fee provisions in the deeds of trust and the constitutional prohibitions against impairment of contracts and abrogation of property rights without due process of law, the significance of this issue is questionable. (3) In any event, however, while attorney fees recovered under Civil Code section 1717 in the trial court are statutorily recoverable as costs, costs on appeal do not normally include attorney fees. (See Cal. Rules of Court, rule 26(c); Visini v. Visini (1963) 212 Cal. App.2d 183, 190 [27 Cal. Rptr. 782]; Downer Corp. v. Union Paving Co. (1959) 172 Cal. App.2d 126, 129 [342 P.2d 64].)
The petitions for peremptory writs of mandate are, and each of them is, denied. The alternative writs heretofore issued are discharged.
Morris, P.J., and McDaniel, J., concurred.
The application of petitioners in No. 30850 for a hearing by the Supreme Court was denied May 16, 1984.
NOTES
[1]  Civil Code section 1717 reads in pertinent part: "(a) In any action on a contract, where the contract specifically provides that attorney's fees and costs, which are incurred to enforce the provisions of that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the prevailing party, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to costs and necessary disbursements.

".... .... .... .... .... .... .
"Reasonable attorney's fees shall be fixed by the court, upon notice and motion by a party, and shall be an element of the costs of suit.
".... .... .... .... .... .... .
"(b)(1) The court, upon notice and motion by a party, shall determine who is the prevailing party, whether or not the suit proceeds to final judgment. Except as provided in paragraph (2), the prevailing party shall be the party who is entitled to recover costs of suit."
