SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have read this article: , and i put this line in my code: SPUtility.Redirect("Event.aspx", SPRedirectFlags.Trusted, HttpContext.Current); But debuger show me that is no Context. It don't cnow what context it is.

share|improve this question
up vote 3 down vote accepted

Answer to your problem is in the same article: Save HttpContext to the field in the constructor of your event handler class.

public class MyEventHandler: SPItemEventReceiver 
    HttpContext current;
    public MyEventHandler()
        current = HttpContext.Current;
share|improve this answer
But it vrite me that method schould have return type. – Grzegorz Z Oct 27 '12 at 19:35
And MyEventHandler() is getting underline red. – Grzegorz Z Oct 27 '12 at 19:36
MyEventHandler() is not a method, it is constructor. So, I think the problem is in incorrect syntax in your class. – Dmitry Kozlov Oct 27 '12 at 19:44
So how I can it manage ? – Grzegorz Z Oct 27 '12 at 22:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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