Handle exception in ProcessPostData

M

Mono

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

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

Zarko
 
T

Teemu Keiski

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.
 
M

Mono

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top