Handle exception in ProcessPostData

Discussion in 'ASP .Net Web Controls' started by Mono, Nov 24, 2003.

  1. Mono

    Mono Guest

    Is there any way to catch (and handle) exceptions in the ProcessPostData or
    ProcessPostDataSecondTry methods?

    p.s.
    "No" is not an answer ;)

    Zarko
    Mono, Nov 24, 2003
    #1
    1. Advertising

  2. Mono

    Teemu Keiski Guest

    In a control certainly (means control has relevant LoadPostData method i.e
    IPostBackDataHandler interface where things are done).

    If you mean at the Page, then only way is via generic error handling
    (Application_Error in global.asax for example). Methods that initiate
    postback data loading before and after Page_Load are private to the Page (it
    happens in Page's ProcessRequest method where ProcessPostData method is
    called twice during the Page lifecycle), so you can't that way inject error
    handling code there.

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist


    "Mono" <> wrote in message
    news:...
    > Is there any way to catch (and handle) exceptions in the ProcessPostData

    or
    > ProcessPostDataSecondTry methods?
    >
    > p.s.
    > "No" is not an answer ;)
    >
    > Zarko
    >
    >
    Teemu Keiski, Nov 26, 2003
    #2
    1. Advertising

  3. Mono

    Mono Guest

    Teemu,

    Yes I need this in a custom web control, and no I cannot use
    IPostBackDataHandler since ProcessPostData is called before (error raised
    results in LoadPostData NOT called).

    Zarko

    "Teemu Keiski" <> wrote in message
    news:...
    > In a control certainly (means control has relevant LoadPostData method i.e
    > IPostBackDataHandler interface where things are done).
    >
    > If you mean at the Page, then only way is via generic error handling
    > (Application_Error in global.asax for example). Methods that initiate
    > postback data loading before and after Page_Load are private to the Page

    (it
    > happens in Page's ProcessRequest method where ProcessPostData method is
    > called twice during the Page lifecycle), so you can't that way inject

    error
    > handling code there.
    >
    > --
    > Teemu Keiski
    > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > ASP.NET Forum Moderator, AspAlliance Columnist
    >
    >
    > "Mono" <> wrote in message
    > news:...
    > > Is there any way to catch (and handle) exceptions in the ProcessPostData

    > or
    > > ProcessPostDataSecondTry methods?
    > >
    > > p.s.
    > > "No" is not an answer ;)
    > >
    > > Zarko
    > >
    > >

    >
    >
    Mono, Nov 28, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Saunders
    Replies:
    0
    Views:
    428
    John Saunders
    Jul 23, 2003
  2. Mono
    Replies:
    0
    Views:
    311
  3. Steven
    Replies:
    1
    Views:
    1,477
    Victor Garcia Aprea [MVP]
    Oct 23, 2004
  4. Mono

    Handle exception in ProcessPostData

    Mono, Nov 25, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    162
  5. Umut Tezduyar
    Replies:
    4
    Views:
    430
    Steven Cheng[MSFT]
    Oct 27, 2004
Loading...

Share This Page