Posted By

nickaranz on 05/28/11

Viewed 1 times

Getting Query String from Event Receiver


/ Published in: C#

only works in async. events. Ending in "ing"

  1. // setting the current context MUST be done in the constructor and is only valid for Synchronous events
  2. private HttpContext currentHttpContext = null;
  3.  
  4. public EventReceiver1(): base()
  5. {
  6. currentHttpContext = HttpContext.Current;
  7. }
  8.  
  9. // this in your actual event function
  10. string MyValue = currentHttpContext.Request.QueryString["Parameter"];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.