protected void savecustomisations() { // get the customisation sessioncustomisations scs; scs = (sessioncustomisations)Session["sessioncustomisation"]; if (scs == null) { scs = new sessioncustomisations(); } string s; // loop form variables, look for the ones that we are after and save these for (int i = 0; i < Request.Form.Count; i++) { s = Request.Form.GetKey(i); if (s.StartsWith("htsp")) { s = s.Substring(4); scs.addsessioncustomisation(sa.articlefilename, s, Request.Form[i], true, true, false); } } // save these values in a cookie and in the session scs.setcookie(Response); Session["sessioncustomisation"] = scs; if (Request.QueryString["return"] == "true") { Response.Redirect("~/review.aspx"); } // otherwise if we have finished choosing articles go on to customise them else if (articleindex >= pl.articles.Count - 1) { Response.Redirect("~/choose_pictures.aspx"); } // otherwise choose the next article else { Response.Redirect("~/customise_articles.aspx?article=" + (articleindex + 1).ToString()); } }
// adds customisable items to the session to be filled in by the user public override void addcustomisables(string article, sessioncustomisations sc) { sc.addsessioncustomisation(article, prompt, finitialtext, true, false, true); }