
742 N.E.2d 893 (2001)
318 Ill.App.3d 83
252 Ill.Dec. 355
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Elston A. HENRY, Defendant-Appellant.
No. 2-99-1437.
Appellate Court of Illinois, Second District.
January 11, 2001.
*894 G. Joseph Weller, Deputy Defender and Steven E. Wiltgen (Court-appointed), Office of the State Appellate Defender, Elgin, James K. Leven (Court-appointed), Chicago, for Elston Henry.
Paul A. Logli, Winnebago County State's Attorney, Rockford, Martin P. Moltz, Deputy Director, State's Attorneys Appellate Prosecutor, Elgin, John X. Breslin, Deputy Director, Robert M. Hansen, State's Attorneys Appellate Prosecutor, Ottawa, for the People.
Justice McLAREN delivered the opinion of the court:
The defendant, Elston A. Henry, appeals from his conviction of a violation of section 407(b)(1) of the Illinois Controlled Substances Act (720 ILCS 570/407(b)(1) (West 1998)). We affirm.
Defendant was charged with four counts of selling substances containing cocaine. Following a jury trial, defendant was convicted of selling between 1 and 15 grams of cocaine to an undercover police officer while in the parking lot of an elementary school. Defendant's posttrial motion was denied, and defendant was sentenced to a term of 13 years and 3 months in prison. This appeal followed.
Defendant raises two issues on appeal. First, defendant contends that the State shifted the burden of proof and standard of review in its closing argument. Second, defendant contends that the court erred in refusing to tender an instruction regarding a lesser-included offense of possession with intent to deliver. In neither instance did defendant object at trial. In fact, defendant never tendered an instruction regarding a lesser-included offense; the issue was brought up only after the State completed its rebuttal closing argument. In his posttrial motion, defendant never mentioned *895 improper argument by the State and only made the following allegation regarding instructions not given to the jury:
"4. That the Court erred in refusing to give the following instruction to the jury, submitted by the defendant."
No instruction is then listed. The motion concludes with "[s]uch other grounds and each and every error as may appear from the report of proceedings of the trial, which is not presently available to defendant or his counsel." No amended motion was ever filed. At the hearing on the motion, defense counsel, when asked if he wished to argue, stated, "No, Your Honor. I'll be standing on the argument from the trial and the motion, of course."
Both a trial objection and a written posttrial motion raising the complained-of issue are required to preserve alleged errors that could have been raised at the trial. People v. Enoch, 122 Ill.2d 176, 186, 119 Ill.Dec. 265, 522 N.E.2d 1124 (1988). The failure to specifically raise an alleged error in a written posttrial motion results in the waiver of the issue, as general allegations of error do not alert the trial court to alleged errors that can be corrected at the trial court level. See People v. Walensky, 286 Ill.App.3d 82, 96, 221 Ill. Dec. 528, 675 N.E.2d 952 (1996). However, where errors affect substantial rights, denying the accused a fair and impartial trial, or where the evidence is closely balanced, a reviewing court may choose to consider an otherwise waived issue. People v. Rivera, 277 Ill.App.3d 811, 818, 214 Ill.Dec. 575, 661 N.E.2d 429 (1996).
Here, we conclude that defendant has waived the issue of the State's closing argument. Our review of defendant's argument reveals statements by the prosecutor that do not shift the burden of proof to the defendant as much as they fail to address fully the issue of entrapment. Defendant argues that the State's closing argument did not "frame the legal issue" properly and that the State presented "little if any evidence" that defendant was predisposed to selling drugs on school property. However, prosecutors are afforded substantial latitude in closing argument and, even when the argument may be improper, such arguments will not warrant reversal unless they result in substantial prejudice to the defendant. People v. Nolan, 291 Ill.App.3d 879, 886, 225 Ill.Dec. 841, 684 N.E.2d 832 (1997). Here, according to defendant, the State had little evidence of defendant's propensity to sell drugs on school property, and the State did not argue regarding that propensity in closing argument. We believe that the State is to be given latitude to determine which aspects of its case to accentuate in its closing argument. Furthermore, defendant argued the law of entrapment to the jury, and there is no allegation that the jury was improperly instructed by the court on the issue of entrapment. We do not conclude that defendant was denied a fair trial by the prosecutor's closing argument and, therefore, will not address that issue as plain error.
However, this court has held that a defendant's right to tender a lesser-included-offense instruction affects a substantial right. See People v. De Paolo, 317 Ill. App.3d 301, 310, 251 Ill.Dec. 94, 739 N.E.2d 1027 (2000). Therefore, we will review defendant's second contention of error.
In general, a defendant may not be convicted of an offense for which he has not been charged. People v. Landwer, 166 Ill.2d 475, 485, 211 Ill.Dec. 465, 655 N.E.2d 848 (1995). However, a defendant may, where appropriate, be entitled to have the jury instructed concerning less serious offenses that are included in the charged offense. Landwer, 166 Ill.2d at 485-86, 211 Ill.Dec. 465, 655 N.E.2d 848. Such a jury instruction is not appropriate where an entrapment defense has been raised. See Landwer, 166 Ill.2d at 486-89, 211 Ill.Dec. 465, 655 N.E.2d 848. The defense of entrapment requires a defendant to admit to committing all the elements of the charged offense. Landwer, 166 Ill.2d at *896 488, 211 Ill.Dec. 465, 655 N.E.2d 848. There can be no dispute regarding mental state or the facts necessary to support any element of the crime because they must be admitted as part of the entrapment defense; the only remaining disputed factual inquiry is whether the defendant was entrapped. Landwer, 166 Ill.2d at 489, 211 Ill.Dec. 465, 655 N.E.2d 848. The logic behind this is that it is both factually and legally inconsistent for a defendant to deny committing the offense and then assert the defense that he committed the offense, but only because of incitement or inducement by the authorities. People v. Gillespie, 136 Ill.2d 496, 501, 145 Ill.Dec. 915, 557 N.E.2d 894 (1990).
Here, defendant sought to instruct the jury on the offense of possession with intent to deliver 1 to 15 grams of cocaine, with no mention of the location of the delivery of the cocaine, which would be punishable as a Class 1 felony instead of a Class X felony. See 720 ILCS 570/401(c)(2), 407(b)(1) (West 1998). He also raised the entrapment defense, arguing that "he was entrapped into delivering drugs on school grounds." Defendant cites no precedent, and we are aware of none, in which a defendant is allowed to argue that he was entrapped into committing only certain elements of an offense. Entrapment is an all-or-nothing proposition. A defendant must choose either to raise the entrapment defense and admit to committing the charged offense or abandon the entrapment defense and seek the lesser-included-offense instruction. See Landwer, 166 Ill.2d at 488-89, 211 Ill.Dec. 465, 655 N.E.2d 848. That, too, is an all-or-nothing proposition. Defendant cannot have it both ways.
Defendant's reliance on Landwer is misplaced. In Landwer, the evidence supported the defendant's claim that he solicited an undercover officer to commit an aggravated battery in addition to soliciting the officer to commit murder, the offense with which the defendant was charged. In this case, unlike Landwer, defendant is not arguing that there were facts indicating that he committed some other, uncharged offense; he is not contending that he sold drugs on other than school property. Instead, he is arguing that he merely did not have the intent to sell drugs on school property. Defendant here is attempting to distinguish between alleged states of intent rather than different factual situations, as was the case in Landwer. Defendant chose to argue that he was entrapped into committing this offense. He cannot also seek to be found guilty of a lesser offense for which there is no evidentiary support in the record. Therefore, the court did not err in refusing defendant's request for a lesser-included-offense instruction.
For these reasons, the judgment of the circuit court of Winnebago County is affirmed.
Affirmed.
COLWELL and RAPP, JJ., concur.
