Inherited Page Won't Fire Postback Events

Discussion in 'ASP .Net' started by James Hancock, Apr 5, 2004.

  1. I have a page, which is inherited from another page (PageEx is what I call
    it) All of our pages are based on PageEx because there is a bunch of logic
    stuff we do in there. My problem is, that if I have a page that is
    inherited from PageEx, the post back events don't get called on the page.
    If I put back the page to inherit from UI.Page everything is fine except we
    don't have database settings etc.

    Anyone have any ideas?

    Thanks!
    James Hancock
     
    James Hancock, Apr 5, 2004
    #1
    1. Advertising

  2. Make sure that your PageEx overrides PageLoad and calls the base logic (in addition to whatever else you want to do), e.g. (vb syntax

    Protected Overrides Sub onload(ByVal e As EventArgs
    MyBase.OnLoad(e
    End Su

    I think that will do it

    Bil

    ----- James Hancock wrote: ----

    I have a page, which is inherited from another page (PageEx is what I call
    it) All of our pages are based on PageEx because there is a bunch of logic
    stuff we do in there. My problem is, that if I have a page that is
    inherited from PageEx, the post back events don't get called on the page.
    If I put back the page to inherit from UI.Page everything is fine except we
    don't have database settings etc

    Anyone have any ideas

    Thanks
    James Hancock
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Apr 5, 2004
    #2
    1. Advertising

  3. Tried that. Still doesn't work.... no events firing.

    (I was using On_Init in PageEx for my stuff)

    "Bill Borg" <> wrote in message
    news:...
    > Make sure that your PageEx overrides PageLoad and calls the base logic (in
    > addition to whatever else you want to do), e.g. (vb syntax)
    >
    > Protected Overrides Sub onload(ByVal e As EventArgs)
    > MyBase.OnLoad(e)
    > End Sub
    >
    > I think that will do it.
    >
    > Bill
    >
    > ----- James Hancock wrote: -----
    >
    > I have a page, which is inherited from another page (PageEx is what I
    > call
    > it) All of our pages are based on PageEx because there is a bunch of
    > logic
    > stuff we do in there. My problem is, that if I have a page that is
    > inherited from PageEx, the post back events don't get called on the
    > page.
    > If I put back the page to inherit from UI.Page everything is fine
    > except we
    > don't have database settings etc.
    >
    > Anyone have any ideas?
    >
    > Thanks!
    > James Hancock
    >
    >
    >
     
    James Hancock, Apr 5, 2004
    #3
  4. More info:

    In the PageEx it sets the .text of a few controls (not the ones that have
    the events on them) based on language stuff.

    If I comment out this code, no problem and everything fires. However if I
    don't, no go.

    Changing the text of a control shouldn't matter should it!?

    James Hancock

    "James Hancock" <> wrote in message
    news:...
    > Tried that. Still doesn't work.... no events firing.
    >
    > (I was using On_Init in PageEx for my stuff)
    >
    > "Bill Borg" <> wrote in message
    > news:...
    >> Make sure that your PageEx overrides PageLoad and calls the base logic
    >> (in addition to whatever else you want to do), e.g. (vb syntax)
    >>
    >> Protected Overrides Sub onload(ByVal e As EventArgs)
    >> MyBase.OnLoad(e)
    >> End Sub
    >>
    >> I think that will do it.
    >>
    >> Bill
    >>
    >> ----- James Hancock wrote: -----
    >>
    >> I have a page, which is inherited from another page (PageEx is what I
    >> call
    >> it) All of our pages are based on PageEx because there is a bunch of
    >> logic
    >> stuff we do in there. My problem is, that if I have a page that is
    >> inherited from PageEx, the post back events don't get called on the
    >> page.
    >> If I put back the page to inherit from UI.Page everything is fine
    >> except we
    >> don't have database settings etc.
    >>
    >> Anyone have any ideas?
    >>
    >> Thanks!
    >> James Hancock
    >>
    >>
    >>

    >
    >
     
    James Hancock, Apr 5, 2004
    #4
  5. James, I've been out of touch for a couple days...sorry for the delayed response. Did you get this figured out? Else, please reply with the bare bones version of PageEx and the subclassed page that fails, and I'll try it out

    Bil

    ----- James Hancock wrote: ----

    More info

    In the PageEx it sets the .text of a few controls (not the ones that have
    the events on them) based on language stuff

    If I comment out this code, no problem and everything fires. However if I
    don't, no go

    Changing the text of a control shouldn't matter should it!

    James Hancoc

    "James Hancock" <> wrote in message
    news:..
    > Tried that. Still doesn't work.... no events firing
    >> (I was using On_Init in PageEx for my stuff
    >> "Bill Borg" <> wrote in message

    > news:..
    >> Make sure that your PageEx overrides PageLoad and calls the base logic
    >> (in addition to whatever else you want to do), e.g. (vb syntax
    >>>> Protected Overrides Sub onload(ByVal e As EventArgs

    >> MyBase.OnLoad(e
    >> End Su
    >>>> I think that will do it
    >>>> Bil
    >>>> ----- James Hancock wrote: ----
    >>>> I have a page, which is inherited from another page (PageEx is what I

    >> cal
    >> it) All of our pages are based on PageEx because there is a bunch of
    >> logi
    >> stuff we do in there. My problem is, that if I have a page that i
    >> inherited from PageEx, the post back events don't get called on the
    >> page
    >> If I put back the page to inherit from UI.Page everything is fine
    >> except w
    >> don't have database settings etc
    >>>> Anyone have any ideas
    >>>> Thanks

    >> James Hancoc
    >>>>>>>>
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Apr 8, 2004
    #5
    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. Replies:
    6
    Views:
    3,329
    Matt Berther
    Jan 19, 2005
  2. Chad
    Replies:
    4
    Views:
    8,338
  3. fix
    Replies:
    0
    Views:
    369
  4. Crazy Cat
    Replies:
    3
    Views:
    377
    Crazy Cat
    Oct 14, 2008
  5. ton

    events won't fire first time

    ton, Nov 5, 2010, in forum: ASP .Net
    Replies:
    0
    Views:
    638
Loading...

Share This Page