Ask a Question related to ASP.NET General, Design and Development.
-
Marina #1
Re: catching exceptions from web user controls
You need to handle the Error event of the page.
"noname" <abe.at.dont.include.this.virpack.com> wrote in message
news:O3B2BYWRDHA.3132@tk2msftngp13.phx.gbl...it> i want to be able to throw an exception in my web user control and catchto> in the containing page. i've tried overloading some of the page methodsfoo.ascx.cs:64> no avail. here's the stack trace:
>
> .
> .
> .
> ANameSpace.FooClass.Page_Load(Object sender, EventArgs e) ininto> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +29
> System.Web.UI.Control.LoadRecursive() +92
> System.Web.UI.Control.LoadRecursive() +92
> System.Web.UI.Page.ProcessRequestMain() +724
>
> as far as i can tell, the only place i could inject some try-catch code> the page is at Page.ProcessRequestMain() ... but i can't seem to override
> ProcessRequestMain.
>
> any help?
>
> thanks a ton.
>
>
Marina Guest
-
Why the properties of web user controls which inherted from my custom base UI controls MISSED?
Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable? -
using javascript in User controls to access server controls of the user control
Hello all, I have an asp.net textbox (named txtHidden) and an HtmlButton(named btnAction). I wanted to write a javascript function which will get... -
user controls: dynamiclly added child controls dont survive post back ?
hi, i have some strange behaviour: i've created a web user control that add's some child controls (e.g: textbox, image buttons) to its control... -
Catching thread exceptions
This is a multi-part message in MIME format. ------=_NextPart_000_00DF_01C35DA8.55D95060 Content-Type: text/plain; charset="iso-8859-1"... -
Catching events in web form fired by user control
I'm trying to process an event raised by a user control in the web form that contains that control. I've fathomed out how to handle the event... -
noname #2
Re: catching exceptions from web user controls
thanks for your help. would you mind posting an example? i tried doing
this once but couldn't get it to compile.
thanks again!
"Marina" <zlatkinam@nospam.hotmail.com> wrote in message
news:#lWLRZWRDHA.2148@TK2MSFTNGP10.phx.gbl...override> You need to handle the Error event of the page.
>
> "noname" <abe.at.dont.include.this.virpack.com> wrote in message
> news:O3B2BYWRDHA.3132@tk2msftngp13.phx.gbl...> it> > i want to be able to throw an exception in my web user control and catch> to> > in the containing page. i've tried overloading some of the page methods> foo.ascx.cs:64> > no avail. here's the stack trace:
> >
> > .
> > .
> > .
> > ANameSpace.FooClass.Page_Load(Object sender, EventArgs e) in> into> > System.Web.UI.Control.OnLoad(EventArgs e) +67
> > System.Web.UI.Control.LoadRecursive() +29
> > System.Web.UI.Control.LoadRecursive() +92
> > System.Web.UI.Control.LoadRecursive() +92
> > System.Web.UI.Page.ProcessRequestMain() +724
> >
> > as far as i can tell, the only place i could inject some try-catch code> > the page is at Page.ProcessRequestMain() ... but i can't seem to>> > ProcessRequestMain.
> >
> > any help?
> >
> > thanks a ton.
> >
> >
>
noname Guest
-
Marina #3
Re: catching exceptions from web user controls
It's the same way you handle the load event. Just look at what is generated,
and change it to be for the Error event. Also, there are many examples of
this on the web.
"noname" <abe.at.dont.include.this.virpack.com> wrote in message
news:%23iTeDgWRDHA.2676@TK2MSFTNGP10.phx.gbl...catch> thanks for your help. would you mind posting an example? i tried doing
> this once but couldn't get it to compile.
>
> thanks again!
>
> "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
> news:#lWLRZWRDHA.2148@TK2MSFTNGP10.phx.gbl...> > You need to handle the Error event of the page.
> >
> > "noname" <abe.at.dont.include.this.virpack.com> wrote in message
> > news:O3B2BYWRDHA.3132@tk2msftngp13.phx.gbl...> > > i want to be able to throw an exception in my web user control andmethods> > it> > > in the containing page. i've tried overloading some of the pagecode> > to> > foo.ascx.cs:64> > > no avail. here's the stack trace:
> > >
> > > .
> > > .
> > > .
> > > ANameSpace.FooClass.Page_Load(Object sender, EventArgs e) in> > > System.Web.UI.Control.OnLoad(EventArgs e) +67
> > > System.Web.UI.Control.LoadRecursive() +29
> > > System.Web.UI.Control.LoadRecursive() +92
> > > System.Web.UI.Control.LoadRecursive() +92
> > > System.Web.UI.Page.ProcessRequestMain() +724
> > >
> > > as far as i can tell, the only place i could inject some try-catch> override> > into> > > the page is at Page.ProcessRequestMain() ... but i can't seem to>> >> > > ProcessRequestMain.
> > >
> > > any help?
> > >
> > > thanks a ton.
> > >
> > >
> >
>
Marina Guest



Reply With Quote

