protected void Page_Load(object sender, EventArgs e) { int campID = Request["CampaignID"].ToInt(); string rptType = Request["RptType"]; if (campID == 0 || string.IsNullOrEmpty(rptType)) return; ReportType type = (ReportType)rptType.ToInt(); List<Donation> p = DonationBLL.Get(campID, type); foreach (Donation item in p) { ThanksLetterUserControl uc = new ThanksLetterUserControl(); uc = (ThanksLetterUserControl)LoadControl("~/Collect/ThanksLetterUserControl.ascx"); uc.Fill_Letter(item); divCon.Controls.Add(uc); HtmlGenericControl gen = new HtmlGenericControl(); gen.TagName = "div"; gen.Attributes.Add("style", "page-break-after:always;"); divCon.Controls.Add(gen); } }
protected void Page_Load(object sender, EventArgs e) { int campID = Request["CampaignID"].ToInt(); string rptType = Request["RptType"]; if (campID == 0 || string.IsNullOrEmpty(rptType)) { return; } ReportType type = (ReportType)rptType.ToInt(); List <Donation> p = DonationBLL.Get(campID, type); foreach (Donation item in p) { ThanksLetterUserControl uc = new ThanksLetterUserControl(); uc = (ThanksLetterUserControl)LoadControl("~/Collect/ThanksLetterUserControl.ascx"); uc.Fill_Letter(item); divCon.Controls.Add(uc); HtmlGenericControl gen = new HtmlGenericControl(); gen.TagName = "div"; gen.Attributes.Add("style", "page-break-after:always;"); divCon.Controls.Add(gen); } }