Getting Query String from Event Receiver

/ Published in: C#
Save to your folder(s)

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

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

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.