Saturday, October 20, 2007

AJAX Accordian Control - Object reference not set to an instance of an object

I was getting the error message for all the Standard Controls available in the Toolbar.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

I was wondering why and I found a neat and straight workaround in the following link http://couldbedone.blogspot.com/2007/07/what-wrong-with-accordion-control.html


This workaround worked for me well, by adding

Accordion1.FindControl("nothing")

in page_init handler

No comments: