There are some non-elegant ways to accomplish that. Check my mef + web forms
sample.

Sent from my Windows Phone
------------------------------
From: Ken Egozi
Sent: 7/27/2011 9:30 PM
To: [email protected]
Subject: Re: ASP.NET WebForms + Windsor + FluentNHibernate

as opposed to the MVC framework (and most others) where you have some
control over the creation of your application's entry point (the
Controller), with WebForms you cannot control the way the Page is
being instantiated (at least up to the current version). So constructor
injection is not feasible for WebForms pages.
What you should be looking at are some (probably old) texts regarding MVP
and MVC implementations for WebForms.
The general approach is to defer all logic from Page to another class, and
have that class Resolved and Released by windsor on Page Init and on after
Render (or whatever is the last thing on the lifecycle).


Ken Egozi.
http://kenegozi.com/blog
http://social.sears.com
http://www.musicglue.com
http://www.castleproject.org
http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם



On Thu, Jul 28, 2011 at 6:36 AM, Leonardo Lima
<[email protected]>wrote:

> Hi,
>
> I need an sample project to learn how to set up Windsor with ASP.NET
> WebForms, I found a lot of samples with ASP.NET MVC, but I got really
> confused and I could not understand how to make all work together.
> Someone can send me one???
>
> Thanks,
>
> Best regards,
> Leonardo Lima
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>
 --
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to