For one click of the save button I get mutiple triggering of the Document_BeforeSave handler.. and depending on which property has been changed in the document I get differing UpdateDates than the one that is given on page_load for the document.
Anyone care to explain... or point me in the direction of a resource?
I have refactored slightly to now include in a compiled dll that sits in the bin folder
using System; using System.Collections.Generic; using System.Text; using umbraco.cms.businesslogic.web; using umbraco.BusinessLogic;
namespace UmbracoJPT { public class Concurrency : ApplicationBase { public Concurrency() { Document.BeforeSave += new Document.SaveEventHandler(Document_BeforeSave); }
Action handler before_save fires multiple times for a single document save...
just doing a simple test at present, and struggling to understand the framework
Document.BeforeSave += new Document.SaveEventHandler(Document_BeforeSave);
void Document_BeforeSave(Document sender, umbraco.cms.businesslogic.SaveEventArgs e)
{
System.Web.HttpContext.Current.Response.Write("BEFORESAVE " + sender.Id +"-" + sender.UpdateDate+ "<br/>");
}
For one click of the save button I get mutiple triggering of the Document_BeforeSave handler.. and depending on which property has been changed in the document I get differing UpdateDates than the one that is given on page_load for the document.
Anyone care to explain... or point me in the direction of a resource?
What version of Umbraco are you running?
Apologies, I normal add that tech string...
umb:4.5.2, windows vista, iis6, .net 3.5 sp1
I have refactored slightly to now include in a compiled dll that sits in the bin folder
So now on each save I get the response.write occuring twice.
I get this same problem, any ideas?
I am on 4.5.2 IIS7 .net v4
Cheers,
Ed
is working on a reply...