title: Code not working when deployed on hosting server but works in local
body: <p>My code is working correctly in local but when I deployed it to hosting server I am getting the following error </p>
  
  <pre><code>System.Data.DataRowView' does not contain a property with the name 'date'.
  </code></pre>
  
  <p>I have checked the internet and based on solutions I found I have checked the below cases and they are fine:</p>
  
  <ol>
  <li>Generally occurs due to misspelled column names, hence one should recheck that.</li>
  <li>If the column names in the Control is correct then check what columns your query is returning and the column that you have specified to the control exists or not.</li>
  <li>Many times due to exceptions nothing is returned in that case check the code for such issues.</li>
  </ol>
  
  <p>I have checked all the above and they are all working in local</p>
  
  <p>Part of the code in the page where the error is as follows:</p>
  
  <pre><code>   &lt;asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /&gt;
                  &lt;asp:BoundField DataField="email" HeaderText="email" SortExpression="email" /&gt;
                  &lt;asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" /&gt;
  
                   &lt;asp:TemplateField HeaderText="date"&gt;
                       &lt;ItemTemplate &gt;
                       &lt;%#Eval("date")%&gt;
                       &lt;/ItemTemplate&gt;
  
                   &lt;/asp:TemplateField&gt;
  
                   &lt;asp:BoundField DataField="time" HeaderText="time" SortExpression="time" /&gt;
                  &lt;asp:BoundField DataField="street" HeaderText="street" SortExpression="street" /&gt;
                  &lt;asp:BoundField DataField="street2" HeaderText="street2" SortExpression="street2" /&gt;
                  &lt;asp:BoundField DataField="area" HeaderText="area" SortExpression="area" /&gt;
                  &lt;asp:BoundField DataField="city" HeaderText="city" SortExpression="city" /&gt;
                  &lt;asp:BoundField DataField="dstreet" HeaderText="dstreet" SortExpression="dstreet" /&gt;
                  &lt;asp:BoundField DataField="dstreet2" HeaderText="dstreet2" SortExpression="dstreet2" /&gt;
                  &lt;asp:BoundField DataField="darea2" HeaderText="darea2" SortExpression="darea2" /&gt;
                  &lt;asp:BoundField DataField="dcity2" HeaderText="dcity2" SortExpression="dcity2" /&gt;
                  &lt;asp:BoundField DataField="typeoftrip" HeaderText="typeoftrip" SortExpression="typeoftrip" /&gt;
              &lt;/Columns&gt;
  
          &lt;/asp:GridView&gt; 
  
  &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server"         ConflictDetection="CompareAllValues" ConnectionString="&lt;%$ ConnectionStrings:ConnectionStringName %&gt;" DeleteCommand="DELETE FROM [customerdetails] WHERE [customerid] = @original_customerid" InsertCommand="INSERT INTO [customerdetails] ([name], [email], [phone], [date], [time], [street], [street2], [area], [city], [dstreet], [dstreet2], [darea2], [dcity2], [typeoftrip]) VALUES (@name, @email, @phone, @date, @time, @street, @street2, @area, @city, @dstreet, @dstreet2, @darea2, @dcity2, @typeoftrip)" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM customerdetails where [date] &gt; dateadd(hh, 14, convert(datetime, convert(date, dateadd(d,-1, getdate())))) and  [date] &lt; dateadd(hh, 14, convert(datetime, convert(date, dateadd(d, 1, getdate()))))" UpdateCommand="UPDATE [customerdetails] SET [name] = @name, [email] = @email, [phone] = @phone, [time] = @time, [street] = @street, [street2] = @street2, [area] = @area, [city] = @city, [dstreet] = @dstreet, [dstreet2] = @dstreet2, [darea2] = @darea2, [dcity2] = @dcity2, [typeoftrip] = @typeoftrip WHERE [customerid] = @original_customerid "&gt;
  </code></pre>