On 6/11/06, Fábio Batista <[EMAIL PROTECTED]> wrote:
On 6/11/06, Craig Neuwirt <[EMAIL PROTECTED]> wrote:
> Do you think I should create a PosBackHelper and maybe handle it this way?
Now it's your turn to elaborate :)
Basically, I need to encapsulate the functionality to determine if a Postback occurs and allow the Controller to use it. Initially, I used specialized Controller with single propery
<Code>
protected bool IsPostback
{
get
{
NameValueCollection fields = Context.Params;
if (fields["__VIEWSTATE"] != null || fields["__EVENTTARGET"] != null)
{
return true;
}
{
get
{
NameValueCollection fields = Context.Params;
if (fields["__VIEWSTATE"] != null || fields["__EVENTTARGET"] != null)
{
return true;
}
return false;
}
}
}
}
</Code>
But I would rather avoid inheritance. It would seem like a good candidate for a Helper (like other MonoRail helpers) since it needs to be IControllerAware to access the current context. I could then use standard SmartDispatcherController and annoate with the HelperAttribute.
craig
--
Fábio David Batista
[EMAIL PROTECTED]
http://nerd-o-matic.blogspot.com
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
