presenter object is null in page load of user control

Topics: General Discussion Forum
Mar 11, 2009 at 5:20 AM

   I tried using default.aspx to display data on a grid and data.aspx for data entry/modifications, they have respective Presenters, now in this project, the requirement is to put the data.aspx in a user control, and put this user control in a default.aspx...Problem encountered so far is at Page load...this._presenter is null...How can I initialized this presenter object???

Mar 11, 2009 at 9:36 AM

Can you give some further context of the problem? Which is the sample/project where you have this issue?
Mar 12, 2009 at 2:43 AM
Edited Mar 12, 2009 at 2:45 AM
Hi hernandelahitte,

   I have a module say configurations which normally has a default.aspx displaying data in a gridview, has add button, edit function when you click a row, a presenter (DefaultViewPresenter.cs), and a Data.aspx which is for data-entry/modification for each record of configurations, with its own presenter (DataPresenter.cs). Now, the requirement, is to put Data.aspx in a usercontrol, and put this user control in Default.aspx, toggle between gridview section and this user control section, tried retaining both presenter, but the presenter object in user control is always null...I tried combining two presenter into one and seems working....looking for way to retain 2 presenters and lityle change of codes from Data.aspx to the user control???? Thanks

Mar 12, 2009 at 4:49 AM
Edited Mar 12, 2009 at 5:00 AM
I have found an approach that uses both Presenters...

My approach is to inherit both presenters in default.aspx.cs and inherit only DataPresenter.cs in usercontrol...When a button event that shows Data.aspx, I supplied the instance object of DataPresenter to usercontrol...

Is there other approach I like to know??? 

Mar 12, 2009 at 10:08 AM
As far as I know, I guess you may find a better answer in the Web Client Software Factory sites here: