Object of presenter is not instantiating using ObjectBuilder class in MVC

Apr 28 2010 2:09 AM
Hi,

I have a situation where I need to create instance of Presenter class using [Create New] attribute of Object Builder class.

I have included all the class libraries required for Object builder and referencing them at the required views as well. But still I m receiving the null pointer exception for Presenter class obj in view class . Please find below code snippet.

[CreateNew]
       public SearchPresenter Presenter
       {
           get
           {
               return _presenter;
           }
           set
           {
               if (value != null)
               {
                   _presenter = value;
                   _presenter.View = this;
               }
           }
       }


I am including below files :

using Microsoft.Practices.ObjectBuilder;

Thank you for your help in advance !

Thanks,
Divya