web user control and events

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ariel Gimenez

    web user control and events

    Hello, i need a solution for this problem:

    i developed a page in which I put a Web user control that is the header of
    the aspx

    1 in the page I have textbox that I do not want to show as much until this
    insurance that has completed all the data of the Web user control.

    2 in the Web user control I have a button that is to save header data

    3 in the page load (the page that contains the control) I ask if in session
    is the data from this Web user control and I show or hidde the textbox

    the problem is that this does not work because first the page executes the
    load and late the web user control code

    some idea of another alternative to handle this?

    thank you very much


  • Steve C. Orr [MVP, MCSD]

    #2
    Re: web user control and events

    Move your code from the Page_Load event to the Page_PreRender event, because
    it happens after the Button's Click event instead of before.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP



    "Ariel Gimenez" <arielgimenezar robahotmail.com > wrote in message
    news:eFrmhOmeEH A.3612@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hello, i need a solution for this problem:
    >
    > i developed a page in which I put a Web user control that is the header of
    > the aspx
    >
    > 1 in the page I have textbox that I do not want to show as much until this
    > insurance that has completed all the data of the Web user control.
    >
    > 2 in the Web user control I have a button that is to save header data
    >
    > 3 in the page load (the page that contains the control) I ask if in[/color]
    session[color=blue]
    > is the data from this Web user control and I show or hidde the textbox
    >
    > the problem is that this does not work because first the page executes the
    > load and late the web user control code
    >
    > some idea of another alternative to handle this?
    >
    > thank you very much
    >
    >[/color]


    Comment

    • Ariel Gimenez

      #3
      Re: web user control and events

      Thanks Steve!!!

      "Steve C. Orr [MVP, MCSD]" <Steve@Orr.ne t> wrote in message
      news:OcjQ8QmeEH A.1652@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Move your code from the Page_Load event to the Page_PreRender event,[/color]
      because[color=blue]
      > it happens after the Button's Click event instead of before.
      >
      > --
      > I hope this helps,
      > Steve C. Orr, MCSD, MVP
      > http://Steve.Orr.net
      >
      >
      > "Ariel Gimenez" <arielgimenezar robahotmail.com > wrote in message
      > news:eFrmhOmeEH A.3612@TK2MSFTN GP12.phx.gbl...[color=green]
      > > Hello, i need a solution for this problem:
      > >
      > > i developed a page in which I put a Web user control that is the header[/color][/color]
      of[color=blue][color=green]
      > > the aspx
      > >
      > > 1 in the page I have textbox that I do not want to show as much until[/color][/color]
      this[color=blue][color=green]
      > > insurance that has completed all the data of the Web user control.
      > >
      > > 2 in the Web user control I have a button that is to save header data
      > >
      > > 3 in the page load (the page that contains the control) I ask if in[/color]
      > session[color=green]
      > > is the data from this Web user control and I show or hidde the textbox
      > >
      > > the problem is that this does not work because first the page executes[/color][/color]
      the[color=blue][color=green]
      > > load and late the web user control code
      > >
      > > some idea of another alternative to handle this?
      > >
      > > thank you very much
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...