Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Handle exception in ProcessPostData

Reply
Thread Tools

Handle exception in ProcessPostData

 
 
Mono
Guest
Posts: n/a
 
      11-24-2003
Is there any way to catch (and handle) exceptions in the ProcessPostData or
ProcessPostDataSecondTry methods?

p.s.
"No" is not an answer

Zarko


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      11-26-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there any way to catch (and handle) exceptions in the ProcessPostData

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



 
Reply With Quote
 
 
 
 
Mono
Guest
Posts: n/a
 
      11-28-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there any way to catch (and handle) exceptions in the ProcessPostData

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

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why CreateChildControls method is invoking between Begin ProcessPostData and End ProcessPostData Umut Tezduyar ASP .Net Web Controls 4 10-27-2004 11:52 AM
Usercontrol events not fired, ProcessPostData Second Try present in trace Steven ASP .Net 1 10-23-2004 02:12 AM
Handle exception in ProcessPostData Mono ASP .Net Building Controls 2 11-26-2003 08:02 AM
Handle exception in ProcessPostData Mono ASP .Net 0 11-24-2003 02:10 PM
Re: ProcessPostData Second Try - Can I force PostData to be processed myself John Saunders ASP .Net 0 07-23-2003 11:11 AM



Advertisments