Posts

Showing posts from November, 2009

"Object reference not set to an instance of an object" Exception When Using A DetailsView Control In ASP.NET

I ran into an exception recently when developing a website in ASP.NET which made use of a DetailsView control bound to an ADO.NET Entity Data Model as its data source (EntityDataSource). The complete exception message was:

[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.UI.WebControls.EntityDataSourceView.ConvertWCProperty(IDictionary values, Dictionary`2 convertedValues, List`1 visitedProperties, PropertyDescriptor pd, ParameterCollection referenceParameters, Dictionary`2& exceptions) +35
System.Web.UI.WebControls.EntityDataSourceView.ConvertProperties(IDictionary values, PropertyDescriptorCollection propertyDescriptors, ParameterCollection referenceParameters) +216
System.Web.UI.WebControls.EntityDataSourceView.CreateEntityForInsert(EntityDataSourceWrapper entityWrapper, IDictionary values, ParameterCollection insertParameters) +49
System.Web.UI.WebControls.EntityDataSourceView.ExecuteInsert(IDictionary values) +239
System.Web.…

jQuery AJAX Calls Not Working In IE8

I recently discovered that some jQuery code I had written for making AJAX calls was not working in IE8, even in Compatibility Mode. Turns out the reason why is that IE8 caches AJAX GET requests. Changing the calls to POST instead of GET corrected the problem. I hope this helps anyone else having this same issue.