Ask a Question related to ASP.NET General, Design and Development.
-
Christian #1
difference between Page_Load() and OnLoad() ?
hi,
what is the difference between the Page_Load() and OnLoad() event handlers.
do they originate from a different point ?
Christian Guest
-
Page_Load issue
Hi, I am relatively knew to the ASP .Net world, so I may be going about this all wrong, but I need to figure this out anyway. I am using a IE... -
Why bad with Page_Load
I have an XML Web Servic (.asmx) to generate an Excel file, and it works as expected. However, here is the bad thing, - if this web service is... -
page_load
I've got an aspx and I need that his page_load event be fired every time I enter the page. Actually I put a break point in the first line in the... -
progress bar and page_load
Hi Basically I call a page that does a very long op But I need to display a progress bar no frames There is an old trick in html and asp ... -
Page_Init() and Page_Load()
Hi, what is the purpose of having a Page_Init() AND a Page_Load() event handler 'cause both will always be executed on loading a page ? What... -
Tu-Thach #2
difference between Page_Load() and OnLoad() ?
OnLoad is a protected method that is raised by the Load
event. I believe this method then calls Page_Load().
Tu-Thach
() event handlers.>-----Original Message-----
>hi,
>
>what is the difference between the Page_Load() and OnLoad>do they originate from a different point ?
>
>
>
>.
>Tu-Thach Guest
-
Christian #3
Re: difference between Page_Load() and OnLoad() ?
the strange thing though is that when I implement both functions only
OnLoad()
is invoked and Page_Load() never is ???
same as with OnInit() and Page_Init()
christian
"Nikolaus Hruska" <nhruska@nist.gov> wrote in message
news:O88LgU9SDHA.2004@TK2MSFTNGP11.phx.gbl...> Onload raises the Load event.
>
> if you want to selectively fire the Load event, override OnLoad, and check
> the necessary conditions.
>
> ex:
>
> Protected Sub OnLoad(sender as object, e as eventargs)
>
> 'only fire load event if condition is met
> If myCondition = True Then
> MyBase.OnLoad()
> End If
> End Sub
>
> --
> Nikolaus R. Hruska
> AASHTO Materials Reference Laboratory
> National Institute of Standards and Technology
> [url]http://amrl.net[/url]
> [email]nhruska@amrl.net[/email]
> "Rob Epstein" <repstein@auctionworks.com> wrote in message
> news:eYl9sQ9SDHA.2148@TK2MSFTNGP10.phx.gbl...> handlers.> > Christian,
> >
> > Page_Load() is a private function created by VS.NET that it then ties to
> > the OnLoad event of the Page class in the InitializeComponents function.
> > As I understand it, there is no need for this step since OnLoad is a
> > protected function in the Page class that can be overriden. Just make
> > sure you call the base OnLoad function in your overloaded version.
> >
> > Rob Epstein
> > Sr Developer, AuctionWorks Inc.
> >
> > Christian wrote:> > > hi,
> > >
> > > what is the difference between the Page_Load() and OnLoad() event>> >> > > do they originate from a different point ?
> > >
> > >
> > >
>
Christian Guest
-
MikeB #4
Re: difference between Page_Load() and OnLoad() ?
"Christian" <christian.cambier@pandora.be> wrote in message
news:G4kRa.14404$F92.1251@afrodite.telenet-ops.be...The Page_Load() event handler needs to be added to the Load event of the> the strange thing though is that when I implement both functions only
> OnLoad()
> is invoked and Page_Load() never is ???
page class. If you're using VS.NET the IDE normally adds code that does
this for you at page init time in an override of the OnInit() method (it's
in a region of code marked with a "#region Web Form Designer generated code"
directive).
Another possible problem is that your override of the OnLoad() method is not
calling base.OnLoad() which is where the event handers registered in the
Load event will be called.
check>
> same as with OnInit() and Page_Init()
>
> christian
>
> "Nikolaus Hruska" <nhruska@nist.gov> wrote in message
> news:O88LgU9SDHA.2004@TK2MSFTNGP11.phx.gbl...> > Onload raises the Load event.
> >
> > if you want to selectively fire the Load event, override OnLoad, andto> > the necessary conditions.
> >
> > ex:
> >
> > Protected Sub OnLoad(sender as object, e as eventargs)
> >
> > 'only fire load event if condition is met
> > If myCondition = True Then
> > MyBase.OnLoad()
> > End If
> > End Sub
> >
> > --
> > Nikolaus R. Hruska
> > AASHTO Materials Reference Laboratory
> > National Institute of Standards and Technology
> > [url]http://amrl.net[/url]
> > [email]nhruska@amrl.net[/email]
> > "Rob Epstein" <repstein@auctionworks.com> wrote in message
> > news:eYl9sQ9SDHA.2148@TK2MSFTNGP10.phx.gbl...> > > Christian,
> > >
> > > Page_Load() is a private function created by VS.NET that it then tiesfunction.> > > the OnLoad event of the Page class in the InitializeComponents-->> > handlers.> > > As I understand it, there is no need for this step since OnLoad is a
> > > protected function in the Page class that can be overriden. Just make
> > > sure you call the base OnLoad function in your overloaded version.
> > >
> > > Rob Epstein
> > > Sr Developer, AuctionWorks Inc.
> > >
> > > Christian wrote:
> > > > hi,
> > > >
> > > > what is the difference between the Page_Load() and OnLoad() event> >> > > > do they originate from a different point ?
> > > >
> > > >
> > > >
> > >
> >
>
MikeB
MikeB Guest



Reply With Quote

