don't get my node back with linq after response.redirect
With this code I just create a new umbraco node (OrderDocType) and refresh the current page, after the response.redirect I try to get my order back with linq.
When I do so I don't get my node back until I hit F5. Does anybody know how to solve this problem?
protected void Page_Load(object sender, EventArgs e) { if (Request["product"] != null) { var orderNr = DateTime.Now.ToString("yyyyMMdd") + "-" + StringHelper.TruncString(Guid.NewGuid().ToString().Replace("-", ""), 20, false); var docOrder = DocumentType.GetByAlias("OrderDoctype"); var newOrder = Document.MakeNew(orderNr, docOrder, new User(0), 1234); newOrder.getProperty("orderNr").Value = orderNr; newOrder.Publish(admin); library.UpdateDocumentCache(newOrder.Id);
CookieHelper.AddCookie("OrderNr", orderNr);
var current = Node.GetCurrent(); Response.Redirect(current.NiceUrl); } else { if (CookieHelper.GetCookie("OrderNr") != null) { var orderNr = CookieHelper.GetCookie("OrderNr"); _ctx = new WebsDataContext(); var order = (from o in _ctx.OrderDoctypes where o.OrderNr == orderNr select o).First(); _ctx.Dispose(); } } }
don't get my node back with linq after response.redirect
With this code I just create a new umbraco node (OrderDocType) and refresh the current page,
after the response.redirect I try to get my order back with linq.
When I do so I don't get my node back until I hit F5.
Does anybody know how to solve this problem?
is working on a reply...