Handle exception in ProcessPostData

Discussion in 'ASP .Net Building Controls' started by Mono, Nov 25, 2003.

  1. Mono

    Mono Guest

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

    p.s.
    From custom web control.

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

  2. Hi Mono,

    I'm thinking of a few ugly ways on how to achieve what you ask for, but can
    you give a few more details on why you need such a thing and what you're
    trying to address, maybe I can come up with a not-so-ugly alternative :)

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx

    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
    "Mono" <> wrote in message
    news:...
    > Is there any way to catch (and handle) exceptions in the ProcessPostData

    or
    > ProcessPostDataSecondTry methods?
    >
    > p.s.
    > From custom web control.
    >
    > Zarko
    >
    >
    >
     
    Victor Garcia Aprea, Nov 26, 2003
    #2
    1. Advertising

  3. Mono

    Mono Guest

    Victor,

    > trying to address, maybe I can come up with a not-so-ugly alternative :)


    I'm reading the folder structure of a directory on a web server, each
    (sub)folder processed is actually displayed as a link on a web page. Now if
    anyone changes the underlying folder structure in a directory (while this
    web page is being displayed) I'm exposing, an error in ProcessPostData will
    be raised - since asp.net cannot find all the controls ("folder hyperlinks")
    that existed on the previous "postback" ok?

    p.s.
    I know the problem is in dynamic creation of controls in a composite web
    control - but on the "next" postback I really don't have all the controls
    that previously "existed" - cannot create a hyper link to raise a postback
    when the folder does not exist anymore - no matter that this particular
    holder-hyperlink was not the one to raise the postback event.

    Now, as I see it, the error pops up in ProcessPostDataSecondTry and there's
    no way to catch and handle the exception there.


    Zarko
     
    Mono, Nov 26, 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:
    434
    John Saunders
    Jul 23, 2003
  2. Mono
    Replies:
    0
    Views:
    312
  3. Steven
    Replies:
    1
    Views:
    1,486
    Victor Garcia Aprea [MVP]
    Oct 23, 2004
  4. Mono

    Handle exception in ProcessPostData

    Mono, Nov 24, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    228
  5. Umut Tezduyar
    Replies:
    4
    Views:
    443
    Steven Cheng[MSFT]
    Oct 27, 2004
Loading...

Share This Page