title: How to change a field value during the ItemUpdating event
body: <p>I am trying to set the value of a field on a ListItem in an event receiver but its not working</p>
  
  <p>All i am doing during the event is</p>
  
  <pre><code>properties.AfterProperties[&lt;field internal name&gt;] = 1;
  </code></pre>
  
  <p>No errors are thrown but the the field i'm setting does not change.
  I have also tried </p>
  
  <pre><code>properties.ListItem[&lt;field internal name&gt;] = 1;
  properties.ListItem.Update();
  </code></pre>
  
  <p>Have also tried SystemUpdate();</p>
  
  <p>I know i am meant to be setting the afterproperties but think i am missing an obvious step.</p>
  
  <p>Thanks</p>