title: Get SharePoint ListItem's After and Before properties in Event Receiver
body: <p>So I'm trying to accomplish this kind of functionality on my SharePoint 2010 list:</p>
  
  <p>I have a field of type choice in my list, which has 7 values and i want users not to be able to change the value of that field from values 2,3,4,5,6,7 to value 1.</p>
  
  <p>I've written an event receiver for that list, here's my code:</p>
  
  <pre><code>public override void ItemUpdated(SPItemEventProperties properties)
     {
         base.ItemUpdated(properties);
  
         string beforeStatus = properties.BeforeProperties["Status"].ToString();
         string afterStatus = properties.AfterProperties["Status"].ToString();
  
         if (beforeStatus != "1stValue" &amp;&amp; afterStatus == "1stValue")
         {
             properties.Cancel = true;
             properties.ErrorMessage = "This isn't allowed.";
         }
     }
  </code></pre>
  
  <p>I've tried using both <code>ItemUpdated</code> and <code>ItemUpdating</code> event receivers, when I was debugging I saw that the event receiver get's called as it should be, but <code>beforeStatus</code> and <code>afterStatus</code> is getting <code>null</code> from the item in both cases.</p>
  
  <p>So, how can I get the values of the item's field before and after updating correctly? Thanks in advance!</p>
  
  <p>Note: the field's internal and display names are both <code>Status</code>.</p>