Sequence of events

Discussion in 'ASP .Net' started by John Spiegel, Jan 3, 2005.

  1. John Spiegel

    John Spiegel Guest

    Hi all,

    I've got an aspx page with a Web user control and (among other things) a
    submit button. When the form is submitted, the same page is to be served
    back up, but with some items changed, mainly a panel visible that had not
    been and a setting in the user control. The problem I'm having is figuring
    out how to manipulate the flagging values as the submit's handler doesn't
    fire until the page and controls' load methods. I'm a bit fuzzy on the
    firing order of methods between objects, but am I better off moving such
    code to the PreRender methods?

    TIA,

    John
     
    John Spiegel, Jan 3, 2005
    #1
    1. Advertising

  2. John Spiegel

    Marina Guest

    Your button click event handler should contain the code to flip the
    visibility of the panel. The Page_Load code should only contain code that
    should execute no matter what.

    "John Spiegel" <> wrote in message
    news:...
    > Hi all,
    >
    > I've got an aspx page with a Web user control and (among other things) a
    > submit button. When the form is submitted, the same page is to be served
    > back up, but with some items changed, mainly a panel visible that had not
    > been and a setting in the user control. The problem I'm having is

    figuring
    > out how to manipulate the flagging values as the submit's handler doesn't
    > fire until the page and controls' load methods. I'm a bit fuzzy on the
    > firing order of methods between objects, but am I better off moving such
    > code to the PreRender methods?
    >
    > TIA,
    >
    > John
    >
    >
    >
    >
     
    Marina, Jan 3, 2005
    #2
    1. Advertising

  3. Yes, moving the code to PreRender is a good idea. It is not always possible,
    especially if what has been clicked affects databinding, but, if it is not a
    case, go for it. You can't change event sequence.

    Eliyahu

    "John Spiegel" <> wrote in message
    news:...
    > Hi all,
    >
    > I've got an aspx page with a Web user control and (among other things) a
    > submit button. When the form is submitted, the same page is to be served
    > back up, but with some items changed, mainly a panel visible that had not
    > been and a setting in the user control. The problem I'm having is

    figuring
    > out how to manipulate the flagging values as the submit's handler doesn't
    > fire until the page and controls' load methods. I'm a bit fuzzy on the
    > firing order of methods between objects, but am I better off moving such
    > code to the PreRender methods?
    >
    > TIA,
    >
    > John
    >
    >
    >
    >
     
    Eliyahu Goldin, Jan 3, 2005
    #3
  4. Hi John,

    I keep the following bookmark handy, when I need to work more closely with
    the execution lifecycle:

    http://msdn.microsoft.com/library/d...guide/html/cpconControlExecutionLifecycle.asp

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "John Spiegel" <> wrote in message
    news:...
    > Hi all,
    >
    > I've got an aspx page with a Web user control and (among other things) a
    > submit button. When the form is submitted, the same page is to be served
    > back up, but with some items changed, mainly a panel visible that had not
    > been and a setting in the user control. The problem I'm having is
    > figuring
    > out how to manipulate the flagging values as the submit's handler doesn't
    > fire until the page and controls' load methods. I'm a bit fuzzy on the
    > firing order of methods between objects, but am I better off moving such
    > code to the PreRender methods?
    >
    > TIA,
    >
    > John
    >
    >
    >
    >
     
    Kevin Spencer, Jan 3, 2005
    #4
  5. John Spiegel

    John Spiegel Guest

    Thanks, all! One problem down, 3.2 million to go <g>.

    "John Spiegel" <> wrote in message
    news:...
    > Hi all,
    >
    > I've got an aspx page with a Web user control and (among other things) a
    > submit button. When the form is submitted, the same page is to be served
    > back up, but with some items changed, mainly a panel visible that had not
    > been and a setting in the user control. The problem I'm having is

    figuring
    > out how to manipulate the flagging values as the submit's handler doesn't
    > fire until the page and controls' load methods. I'm a bit fuzzy on the
    > firing order of methods between objects, but am I better off moving such
    > code to the PreRender methods?
    >
    > TIA,
    >
    > John
    >
    >
    >
    >
     
    John Spiegel, Jan 3, 2005
    #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. Craig Deelsnyder

    Re: Sequence of events on a web form

    Craig Deelsnyder, Jul 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    536
    Craig Deelsnyder
    Jul 28, 2003
  2. Replies:
    2
    Views:
    504
  3. John Dalberg

    Need to trace sequence of server events

    John Dalberg, Oct 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    330
    Mark Fitzpatrick
    Oct 5, 2006
  4. stef mientki
    Replies:
    13
    Views:
    668
    stef mientki
    Oct 20, 2007
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    393
    Chris
    Aug 30, 2005
Loading...

Share This Page