This text is replaced by the Flash movie.

System.NullReferenceException

While trying Telerik component, I got this error System.NullReferenceException - Object reference not set to an instance of an object, I struggle how to find causing this error, And somehow the solution was


From:


ddbImages.Image = ((Image)item.Tag).GetThumbnailImage(20, 20, null, new IntPtr());
ddbImages.Text = item.Text;

To:


if (item != null)
  {
    ddbImages.Image = ((Image)item.Tag).GetThumbnailImage(20, 20, null, new IntPtr());
    ddbImages.Text = item.Text;
  }


Tags: , , ,

Leave a Reply

*