What exactly is this hack for? 
 
  //TODO: document this hack for the sake of our users
   if (httpContext != null)
   {
    if (!httpContext.Items.Contains(ProcessedBeforeKey))
    {
     httpContext.Items[ProcessedBeforeKey] = true;
    }
    else
    {
     if (IsTheSameView(httpContext, viewName)) return;
    }
   }


 
On 6/7/06, hammett <[EMAIL PROTECTED]> wrote:
You may try

if (Params["__VIEWSTATE"] != null || Params["__EVENTTARGET"] != null)
{
// We're in a post back
}

Just a side note: when the view invoke the controller back from an
event, you won't have much options unless redirecting. Rendering a
different view will choke the app. You might try Server.Transfer, I
heard it works, never tried.

On 6/6/06, Craig Neuwirt <[EMAIL PROTECTED]> wrote:
> For those Castle users that use WebForm views, has anyone come up with a
> strategy to enable a Controller to determine if a PostBack has occurred.
> Since WebForms post to the same url, the original controller action will be
> called and it would be nice to know if it is a PostBack so the controller
> can do nothing and let the view process the postback.  The view will then
> delegate back into the controller in the event handler.


--
Cheers,
hammett
http://hammett.castleproject.org/


_______________________________________________
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

Reply via email to