Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Making text of asp:abel dependent on value of asp:calendar control

Reply
Thread Tools

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

 
 
Hans Merkl
Guest
Posts: n/a
 
      11-18-2005
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



 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      11-18-2005
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
>
>
>



 
Reply With Quote
 
 
 
 
Max
Guest
Posts: n/a
 
      11-18-2005
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
>>
>>
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
non-dependent vs. dependent template names puzzlecracker C++ 1 08-07-2008 07:42 AM
Elegant way of making template arguments dependent on user input? Thomas Pajor C++ 5 10-11-2007 04:55 AM
Image dependent on DB value. UJ ASP .Net Datagrid Control 0 05-11-2005 05:16 PM
XML-Schema: Attribute Value dependent rules? Andrew Lord XML 0 06-10-2004 01:34 PM
XDoclet and generating Dependent Value Classes Sigmund Lundgren Java 0 05-26-2004 07:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57