1

I'm trying to refresh the page after the event itemupdated is fired. I've tried at the end of itemupdated without success

 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;
 properties.RedirectUrl = "http://www.google.be/";

I tried too this but no result

SPUtility.Redirect("http://www.google.be", SPRedirectFlags.Trusted, HttpContext.Current);

And finally in itemupdating, I've tried

HttpContext context = HttpContext.Current;
context.Response.Redirect("http://www.google.be");

I've tried the proposed solution but still doesn't work

I've added the synchronous in Element.xml

<Synchronization>Synchronous</Synchronization>

and this line in my itemupdated

SPUtility.Redirect("http://www.google.be", SPRedirectFlags.Trusted, HttpContext.Current); 

But nothing happened

I've no more ideas on how to solve this issue.

2

I believe the solution lies here.

You need to ensure the ItemUpdated event runs synchronously rather than async.

The ItemUpdated event by default will run after the page has already posted back and does not have a connection to the HttpContext of the firing page.

ItemUpdating should have a connection, but marking it as synchronous might help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.