Wednesday, November 25, 2009

Palin Supporters Struggle To Explain Why They Support Her

All politics aside, this shows just how uninformed these people are.

Tuesday, November 24, 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.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +86
System.Web.UI.WebControls.DetailsView.HandleInsert(String commandArg, Boolean causesValidation) +274
System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +676
System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +113
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

The cause of the error was a TemplateField containing an ItemTemplate with a bound DropDownList. I set this up through the wizard, which had placed the name of the bound value in square brackets, as shown below:

Bind("[LinkCategories.LinkCategoryID]")

It turns out this is a known bug in ASP.NET 3.5 SP1. Removing the square brackets, as shown below, corrected the issue.

Bind("LinkCategories.LinkCategoryID")

Monday, November 16, 2009

The Beatles - Hey Bulldog

Tuesday, November 10, 2009

Harry Nilsson - Everybody's Talkin'

Monday, November 09, 2009

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.

Monday, November 02, 2009

Jon Stewart Explains Fox News

The Daily Show With Jon StewartMon - Thurs 11p / 10c
For Fox Sake!
www.thedailyshow.com
Daily Show
Full Episodes
Political HumorHealth Care Crisis

Thursday, October 22, 2009