Making text of asp:abel dependent on value of asp:calendar control

Discussion in 'ASP .Net' started by Hans Merkl, Nov 18, 2005.

  1. Hans Merkl

    Hans Merkl Guest

    Hi,
    I have a web form with a calendar control and a label. The label is
    supposed to always show the selected date of the calendar control. Now I am
    wondering where the best place is to put the code that assigns the value of
    the label.

    So far I am assigning the value of the label in the Page_load method of the
    form and also in the SelectionChanged event of the calendar control.

    Is there a way to get around having to do this in 2 different locations?
    Should I use another event?

    Thanks

    Hans
     
    Hans Merkl, Nov 18, 2005
    #1
    1. Advertising

  2. Hans Merkl

    Bruce Barker Guest

    you should move the logic to prerender.

    -- bruce (sqlwork.com)


    "Hans Merkl" <> wrote in message
    news:5hr4jmqoxbl9.l501a45ojg1$...
    > Hi,
    > I have a web form with a calendar control and a label. The label is
    > supposed to always show the selected date of the calendar control. Now I
    > am
    > wondering where the best place is to put the code that assigns the value
    > of
    > the label.
    >
    > So far I am assigning the value of the label in the Page_load method of
    > the
    > form and also in the SelectionChanged event of the calendar control.
    >
    > Is there a way to get around having to do this in 2 different locations?
    > Should I use another event?
    >
    > Thanks
    >
    > Hans
    >
    >
    >
     
    Bruce Barker, Nov 18, 2005
    #2
    1. Advertising

  3. Hans Merkl

    Max Guest

    That works.

    Thanks

    Hans



    On Fri, 18 Nov 2005 11:24:26 -0800, Bruce Barker wrote:

    > you should move the logic to prerender.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Hans Merkl" <> wrote in message
    > news:5hr4jmqoxbl9.l501a45ojg1$...
    >> Hi,
    >> I have a web form with a calendar control and a label. The label is
    >> supposed to always show the selected date of the calendar control. Now I
    >> am
    >> wondering where the best place is to put the code that assigns the value
    >> of
    >> the label.
    >>
    >> So far I am assigning the value of the label in the Page_load method of
    >> the
    >> form and also in the SelectionChanged event of the calendar control.
    >>
    >> Is there a way to get around having to do this in 2 different locations?
    >> Should I use another event?
    >>
    >> Thanks
    >>
    >> Hans
    >>
    >>
    >>
     
    Max, Nov 18, 2005
    #3
    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. jmo

    ABEL-HDL

    jmo, Dec 2, 2005, in forum: VHDL
    Replies:
    3
    Views:
    1,376
    Mike Treseler
    Dec 4, 2005
  2. Ron

    DATAIO ABEL

    Ron, May 4, 2006, in forum: VHDL
    Replies:
    4
    Views:
    899
  3. Steven P

    Need help to tranlate ABEL

    Steven P, Jul 4, 2006, in forum: VHDL
    Replies:
    4
    Views:
    572
    Steven P
    Jul 6, 2006
  4. Thomas Pajor
    Replies:
    5
    Views:
    396
    robspinella
    Oct 11, 2007
  5. puzzlecracker
    Replies:
    1
    Views:
    521
    James Kanze
    Aug 7, 2008
Loading...

Share This Page