Access ProfileCommon from Presenter

Topics: Web Client Software Factory, User Forum
Jan 17, 2008 at 10:42 PM
Hi,

Is it possible to access ProfileCommon from a presenter? I wanted to move the following code to my presenter, passing the userName and ContactID, but can't figure out how to access the ProfileCommon class from the presenter.

Dim pc As ProfileCommon = CType(ProfileCommon.Create(CreateUserWizard1.UserName, True), ProfileCommon)
pc.ContactID = CInt(CType(CreateUserWizardStep1.FindControl("txtContactID"), TextBox).Text)
pc.Save()
Jan 25, 2008 at 1:00 PM
Hi.

You cannot access the ProfileCommon class from outside the website. This class is automatically generated by ASP.NET at compile-time.
What you could do as a workaround is put methods that interact with the ProfileCommon class in the IView interface and implement them in the View class (where you have access to the ProfileCommon class). Then you can call these methods from the presenter.

Thanks.

Sebastian Iacomuzzi
http://staff.southworks.net/blogs/siacomuzzi