title: Does allowunsafeupdates property need to be set while a list item is fetched in sharepoint?
body: <p>I am new to sharepoint 2010 project. When I went through the code, in many places i found SPWeb.AllowUnsafeUpdates property set to true, even when there are no updates in any elements of the lists. There is some list data fetching. Is this relevant while there is no updation in any of the lists to use AllowUnsafeUpdates to be set to true?</p>
  
  <pre><code>SPWeb thisWeb = workflowProperties.Web;
                          thisWeb.AllowUnsafeUpdates = true;
                          SPList EmployeeDetails = thisWeb.Lists[BasicEmployeeDetailsList];
                          SPList list = workflowProperties.Web.Lists[workflowProperties.List.ID];
                          SPListItem compensatoryLeaveItem = workflowProperties.Item;
                          DataTable creatermail = new DataTable();
                          editurl = workflowProperties.SiteUrl.ToString() + list.DefaultEditFormUrl + "?ID=" + compensatoryLeaveItem["ID"].ToString() + "&amp;Popup=false";
                          string EmployeeDetailsID = compensatoryLeaveItem["Created By"].ToString().Substring(compensatoryLeaveItem["Created By"].ToString().IndexOf('#') + 1);
                          string listQuery = "&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='LoginName' /&gt;&lt;Value Type='User'&gt;" + EmployeeDetailsID + "&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;";
                          SPQuery query = new SPQuery();
                          query.Query = listQuery;
                          SPListItemCollection createrCol = EmployeeDetails.GetItems(query);
                          creatermail = createrCol.GetDataTable();
                          createdbymail = creatermail.Rows[0][FieldMail].ToString();
                          creater = creatermail.Rows[0][FieldFullName].ToString();
                          GetHrDetails(thisWeb);
                          thisWeb.AllowUnsafeUpdates = false;
  </code></pre>