473,386 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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

Nov 20 '05 #1
2 958
you should move the logic to prerender.

-- bruce (sqlwork.com)
"Hans Merkl" <rh*****@newsgroups.nospam> wrote in message
news:5h***************************@40tude.net...
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

Nov 20 '05 #2
Max
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" <rh*****@newsgroups.nospam> wrote in message
news:5h***************************@40tude.net...
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

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg | last post by:
How do you get rid of the days of the month that are not in the month selected in a calendar control? For example, I have a calendar control that shows November, at the beginning and end of the...
1
by: suresh | last post by:
Hi all, I have a little problem with an ASP Calendar Control within a frame. When I click the next month or previous month button it kicks the calendar out of the frame and shows it in a normal...
2
by: js | last post by:
Any way to modify an <asp:Calendar> tag with parameters on the fly? Seems I'm not allowed to use the <% =xxx %> substitution for parameters to the <asp:Calendar> tag. Do I have to do code...
0
by: Mark Rae | last post by:
Hi, Is there any way to show the SelectedDay as, say, a red circle? Something like this: http://www.visualasp.com/vcdl/monthview/monthview_multiple_monthviews.asp N.B. I realise that the...
3
by: WB | last post by:
Hi, Is it poosible to build an appointment planner on a webform using asp:Calendar control? I would like to display one month at a time and show all the appointments scheduled in every day...
0
by: Mark Rae | last post by:
Hi all, Just canvassing people's opinions on the <asp:Calendar> control, specifically in v2. I'm interested to know: 1) Are you using it? If not, is that because you prefer a 3rd-party...
1
by: sloan | last post by:
Ok, maybe the asp:calendar doesn't do it. Anyone know of a codeproject (or similar) place that has a Web ~Server Control .. which displays a week, (not a month as the default asp:calendar does)...
3
by: tranky | last post by:
Hi, i'm an italian programmer. I've a problem with asp:calendar control. I'd like to click into a day of this calendar and show in a asp:label the day. I tried with this code_
2
by: Mark Rae | last post by:
Hi, Has anyone found a fix for the <asp:Calendar/ CSS bug whereby certain attributes (mainly colours) are not rendered correctly? E.g. <asp:Calendar ID="calTest" runat="server"...
1
by: phpmel | last post by:
Hi guys, I have an asp calendar control, text box, calendar icon, eraser icon all within an update panel. The calendar works fine, postbacks are handled without the flickering of the screen etc....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.