
33 Cal.App.3d 405 (1973)
109 Cal. Rptr. 138
BECHTEL CORPORATION et al., Petitioners,
v.
THE SUPERIOR COURT OF TUOLUMNE COUNTY et al., Respondents; GIL STORY et al., Real Parties in Interest.
Docket No. 1951.
Court of Appeals of California, Fifth District.
July 12, 1973.
*406 COUNSEL
Neumiller, Beardslee, Siegert, Glahn, Shephard & Greene, Darrel Glahn, Mayall, Hurley, Knutsen, Smith & Green and Alan E. Smith for Petitioners.
No appearance for Respondents.
Panattoni & Farrell and Leonard C. Panattoni for Real Parties in Interest.
OPINION
FRANSON, J. 

BACKGROUND
On May 7, 1969, a complaint for damages for personal injuries was filed in Stanislaus County Superior Court by Gil Story, real party in interest (hereinafter "Story"), naming petitioners and various Does as defendants. The complaint in essence alleged that Story had been injured while working on a construction site located at the Don Pedro Dam Project in *407 Stanislaus County and that the injury was due to the negligence of the defendants. The named defendants answered the complaint denying that they were negligent and alleging affirmative defenses of contributory negligence and assumption of risk.
A pretrial conference was held on February 5, 1971, following which a pretrial order was entered by the Stanislaus Superior Court on February 10, 1971. The pretrial order provided that on motion of the plaintiff the action was dismissed as to the fictitious defendants. Under "AGREED FACTS" it was stated, among other things, that on May 21, 1968, Story was working as a welder in a tunnel construction on the Don Pedro Dam site when he fell from a ladder and was injured.
The pretrial order contained the following:
"VENUE: During this hearing question has arisen as to proper venue. The Don Pedro tunnel job was in Tuolumne county. Counsel will check their facts and if it is determined that the injury occurred in Tuolumne county, and there is no other basis for venue in Stanislaus county, an order and stipulation will be presented to the court for transfer to Tuolumne county." (Italics added.)[1]
On April 12, 1971, a "stipulation for change of place of trial and order thereon" was filed with the superior court. The stipulation was signed by the attorneys for all of the parties and provided "... that the place of trial of this action be changed to the Superior Court of the County of Tuolumne."
On April 12, 1971, the court signed and filed the order attached to the stipulation, which provided as follows:
"The parties hereto having so stipulated, IT IS HEREBY ORDERED that the place of trial of the cause herein be changed from the Superior Court of the County of Stanislaus to the Superior Court of the County of Tuolumne and on payment by plaintiff of the costs and fees of such transfer ... the clerk of this court is ordered to transfer to the clerk of the court to which this action is ordered transferred all the pleadings and papers on file herein relating to this action, ..." (Italics added.)
*408 On October 10, 1972, petitioners noticed a motion to dismiss the action under Code of Civil Procedure section 581b[2] for failure of Story to pay the costs and transfer fees within one year after the entry of the order transferring the place of trial.
On October 26, 1972, respondent Superior Court for Stanislaus County denied petitioners' motion to dismiss. On November 8, 1972, upon late payment of the costs and transfer fees by Story, the Stanislaus County Clerk transferred the file to the Tuolumne County Clerk. On November 13, 1972, the Tuolumne County Clerk notified all parties in writing that the action had been filed in his office and given superior court number 13880.

DISCUSSION
When an action is brought in an improper court and it is ordered transferred to a proper court, the costs and fees shall be paid by the plaintiff before the transfer is made. (Code Civ. Proc., § 399.) If the plaintiff fails to pay the costs and fees by one year after entry of the order for transfer, the action "must be dismissed." (Code Civ. Proc., § 581b.) In Davis v. Superior Court, 184 Cal. 691, at pages 695-696 [195 P. 390], it is stated: "[T]he only duty resting upon the court and the only power it had ... was to enter a judgment of dismissal." (See also London v. Morrison, 99 Cal. App.2d 876, 880 [222 P.2d 941]; Marshall v. Benedict, 161 Cal. App.2d 284 [326 P.2d 516]; Western Greyhound v. Superior Court, 165 Cal. App.2d 216 [331 P.2d 793]; South v. Wishard, 165 Cal. App.2d 8 [331 P.2d 227].)
The order for transfer was entered by the Stanislaus Superior Court on April 12, 1971. Story failed to pay the costs and fees by one year after *409 entry of the order. Under the mandatory provisions of section 581b the Stanislaus Superior Court had no alternative but to order a dismissal of the action.
Story contends that because the order of transfer was based on the stipulation section 581b is inapplicable.
He cites in support of his contention the case of La Mirada Community Hospital v. Superior Court, 249 Cal. App.2d 39 [57 Cal. Rptr. 42]. In La Mirada, plaintiff filed suit in Orange County for breach of contract against a corporation, a copartnership doing business under the same name, and individual defendants comprising the copartnership. The corporation and the individual defendants demurred and moved for change of venue to Los Angeles County. The grounds for the motion were that the copartnership and one individual defendant were residents of Los Angeles County; that the defendant corporation and defendant copartnership had their principal place of business in Los Angeles County and the contract referred to in the complaint was executed and was to be performed in Los Angeles County. After the motion for change of venue was filed, the parties stipulated that the case could be transferred to Los Angeles County. Pursuant to the stipulation, the Orange County Superior Court transferred the action to the Los Angeles Superior Court "... upon payment of the proper transfer fee." After the plaintiff failed to pay the transfer fees within one year, the defendants moved the Orange County Superior Court to dismiss the action under section 581b. The trial court denied the motion to dismiss on the basis of new affidavits filed at the hearing which showed that some of the individual defendants had resided in Orange County when the suit was filed.
Defendants sought a writ of mandate in the court of appeal and that court denied relief holding by a two to one decision that the order of transfer was based on the stipulation rather than the motion for change of venue because the affidavits in support of the motion failed to show that none of the individual defendants resided in Orange County at the commencement of the action. Because the order of transfer was based on the stipulation it was held not to be within the ambit of 581b.[3]
*410 To the extent that La Mirada stands for the proposition that as a matter of law an order of transfer based on a stipulation of the parties is not within the intendment of section 399 so as to bring 581b into play, we respectfully disagree with the holding. As the dissent in La Mirada points out, the fact that the order of transfer was based upon a stipulation that the action be transferred, does not eliminate the ground upon which the change of venue was sought or granted. (249 Cal. App.2d at p. 47.) The motion for change of venue clearly indicated the ground upon which the parties stipulated to the transfer, i.e., that the action had been commenced in a wrong court; the majority opinion simply ignored the motion in concluding that the order of transfer was based only on the stipulation.[4]
The holding of La Mirada unquestionably would be correct where, absent a motion for change of venue, the parties stipulate to a transfer with nothing in the record to indicate the reason for the transfer. In such a situation it cannot be said that the transfer was ordered because the action was commenced in an improper court. Conversely, if the stipulation expressly provides that the action is being transferred because it was filed in an improper court, the order of transfer, based on the stipulation, demonstrably is for the same reason and the La Mirada rationale does not apply. To hold otherwise would be to draw an untenable distinction between the order and the stipulation.
The pivotal issue in the case at hand is whether the transfer was ordered because the action was commenced in an improper court. (Code Civ. Proc., § 399.) (1a) In ascertaining the reason for the transfer we must look to the record underlying the stipulation upon which the order was made. The venue provisions of the pretrial order and the reasonable inferences to be drawn therefrom ineluctably lead to the conclusion that the parties agreed to the transfer because there was no basis for venue in Stanislaus County, i.e., that Story's injury did not occur there and neither corporate defendant had its principal place of business there.[5]*411 Manifestly, the order for transfer was grounded on the fact that the action had been filed in an improper court.
We also point out that the order for transfer provided "on payment by plaintiff of the costs and fees of such transfer, ... the clerk ... is ordered to transfer...." This language suggests the ground upon which the order was made for it is only when the action is filed in an improper court that the statute expressly mandates the plaintiff to pay the costs of transfer before the transfer can be made. (See Code Civ. Proc., § 399.)
Story asserts that the order of transfer came about solely by the agreement of the parties and not by reason of the action having been filed in a wrong court because if petitioners had timely moved for a change of venue, he would have been entitled to a hearing under section 396b[6] as to whether the convenience of witnesses or the ends of justice required the action to remain in Stanislaus County. He argues that because there was no factual determination of these matters the transfer cannot be deemed as having been made because Stanislaus was an improper court.
Story confuses the statutory definition of "proper court" with the right of an improper court to retain an action if the convenience of witnesses or the interests of justice so demand. Section 396b authorizes a hearing on defendant's motion where the action is commenced in a court having jurisdiction of the subject matter thereof, other than the court designated as the proper court for the trial. The absence of a hearing on the convenience of witnesses and the ends of justice in no way inhibits a determination that the action was transferred because Stanislaus was an improper court.
Story's argument also ignores the effect of his stipulation. (2) A stipulation in proper form is binding upon the parties if it is within the authority of the attorney. (See Palmer v. City of Long Beach, 33 Cal.2d *412 134, 141-144 [199 P.2d 952]; Brock v. Superior Court, 29 Cal.2d 629, 634 [177 P.2d 273, 170 A.L.R. 521].) Unless contrary to law, court rule or public policy, a stipulation is also binding upon the court. (Capital National Bank v. Smith, 62 Cal. App.2d 328 [144 P.2d 665]; 1 Witkin, Cal. Procedure (2d ed. 1970) Attorneys, § 125, p. 138.) Story could have objected to the venue procedure articulated in the pretrial order if he had desired to do so. (Cal. Rules of Court, rule 215(b).) Rather than objecting and presumably after investigating the facts, he stipulated to the transfer. By stipulating he acknowledged that the Stanislaus Superior Court was an improper court to try the case and that the convenience of witnesses and the ends of justice did not preclude a transfer to Tuolumne County.
(1b) We hold that the transfer of the action was ordered because it had been commenced in an improper court within the intendment of section 399. Story having failed to post the fees and costs of transfer by one year after the entry of the order of transfer as required by section 581b, the action must be dismissed.
It is ordered that a writ of mandate issue directing respondent Tuolumne Superior Court to retransfer the case to respondent Stanislaus County Superior Court.
It is ordered that a writ of prohibition issue to respondent Stanislaus County Superior Court restraining said court from taking any further action in the case upon retransfer to it, other than to enter its order dismissing the action.
Brown (G.A.), P.J., and Gargano, J., concurred.
The petition of the real parties in interest for a hearing by the Supreme Court was denied September 19, 1973.
NOTES
[1]  It should be noted that it is unclear from the record as to who raised the question as to venue. The pretrial statements of the parties are not before us. We find no authority by which a court having jurisdiction of the subject matter can, on its own motion, raise the question of proper venue. There is a presumption that the county in which the action is filed is the proper county. (Hearne v. De Young, 111 Cal. 373 [43 P. 1108]; 2 Witkin, Cal. Procedure (2d ed. 1970) Actions, § 522, p. 1342.) However, inasmuch as no party objected to the contents of the pretrial order we can only presume that the procedure articulated therein for resolving the venue question was agreed to by the parties.
[2]  Code of Civil Procedure section 581b provides in part: "No action ... where the same was not originally commenced in the proper court, and which has been ordered transferred to the proper court, shall be further prosecuted, and no further proceedings shall be had therein, until the fees and costs of the transfer thereof and of filing the papers in the court to which transferred have been paid, as provided in Section 399 of this code; and all such actions ... must be dismissed by the court in which the action or proceeding was originally commenced, on its own motion, or on the motion of any party interested therein... where the costs and fees of making up the transcript or papers or for transmission of the same to the clerk or judge of the court to which it is ordered transferred ... have not been so paid for one year after the entry of the order for transfer."

Code of Civil Procedure section 399 provides in relevant part: "... When the transfer is sought solely, or is ordered, because the action or proceeding was commenced in a court other than that designated as proper by the provisions of this title, such costs and fees shall be paid by the plaintiff before such transfer is made; ..." (Italics added.)
Hereafter, all section references are to the Code of Civil Procedure.
[3]  The court's rationale was that 581b applies on its face only to payment of costs and fees "as provided by section 399"; that section 399 provides for payment of costs and fees as a condition of transmitting the pleadings and papers to the transferee court only where the order is made transferring the action "under any of the provisions of this title" (tit. 4, pt. 2 of Code Civ. Proc., being §§ 392-402); that an order for transfer based on a stipulation that a transfer be made is not one of the grounds so designated.
[4]  We also point out that La Mirada is distinguishable on its facts in that the record upon which the trial court denied the motion to dismiss did not show that the action had been commenced in an improper court. Also, it appears from the opinion that the order of transfer did not provide that the plaintiff was to pay the fees and costs of transfer as a condition of the transfer.
[5]  A corporation may be sued in the county where the obligation or liability arises or the breach occurs, i.e., the place of injury in a negligence action, or in the county where the principal place of business of such corporation is situated. (Cal. Const., art. XII, § 16, repealed June 6, 1972, now Code Civ. Proc., § 395.5, effective June 6, 1972.) If petitioners had timely moved for a change of venue they would have had the burden of proving the nonexistence of any bases for venue in Stanislaus County (Smith v. Stanford Research Institute, 212 Cal. App.2d 750, 753 [28 Cal. Rptr. 481]; 2 Witkin, Cal. Procedure (2d ed. 1970) Actions, § 522, pp. 1342-1343.) Petitioners were relieved of this burden by Story's acquiescence in the pretrial order and stipulation to the transfer.
[6]  Code of Civil Procedure section 396b provides in relevant part: "... if an action ... is commenced in a court having jurisdiction of the subject matter thereof, other than the court designated as the proper court for the trial thereof, under the provisions of this title, the action may, notwithstanding, be tried in the court where commenced, unless the defendant, at the time he answers or demurs, or, at his option, without answering or demurring and within the time otherwise limited to plead, files with the clerk ... an affidavit of merits and notice of motion for an order transferring the action ... to the proper court ... provided further, that in any case, if an answer be filed, the court may consider opposition to the motions, if any, and may retain the action in the county where commenced if it appears that the convenience of the witnesses or the ends of justice will thereby be promoted."
