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

is there any way we can pass parameter value(selected form field value(drop down box) from newform.aspx)to the event receiver(itemadding) from newform.aspx()in sharepoint 2010, so that they can be received using request.querystring['']; in the event receiver code....

share|improve this question
up vote 2 down vote accepted

If the dropdown represents one of the column in your list, it should be available as one of the key in properties.AfterProperties.

DISCLAIMER: I have not tried it but since ItemAdding is synchronous event and there is a way to access the HTTPContext in event receivers, you may be able to get to HttpContext.Request.QueryString.

share|improve this answer
did you try what I said in Disclaimer? follow the link and in constructor, try tp access Request Query string and store it in a class level variable and the use it in ItemAdding event code. – Ashish Patel Jan 17 '12 at 14:55
Excellent i was able to get the selected index of the dropdown box using the properties.AfterProperties i want to use this index value "12" and get the corresponding name assicated to it from the look up list .. SPWeb Oweb = properties.OpenWeb(); SPList Olist = Oweb.Lists["AssignmentNames"]; SPListItemCollection OspListItemCollection = Olist.Items; foreach (SPListItem Osplistitem in OspListItemCollection)...but i m not sure how to get the name based on the index that i have..Thanks – spStacker Jan 17 '12 at 15:35
You can use GetItemById(12)["your name field”] method on your SPList object. – Ashish Patel Jan 17 '12 at 16:17

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.