473,473 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month?

To whom may concern:
In Asp.Net Calender control, how to display 5 lines if there are only 5
lines in one month? Now there are 6 lines even that I don't show the
data in other months.

Thanks in advance!
Jack
2005-10-11

Nov 19 '05 #1
9 1638
All months which begin on a Friday or a Saturday
need to display 6 lines, because there's 4 complete
weeks and 2 partial weeks in them.

To display a calendar so that the months which *can* display in
5 lines (the months which start on Sun, Mon, Tue, Wed or Thu)
do display in 5 lines, set the ForeColor and BackColor properties
for the "OtherMonthDay Style" to white.

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

If you have set the Calendar's BackColor to any other color
but white, set the "OtherMonthDay Style" to whatever BackColor
you set the Calendar's BackColor to.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Jack" <ls*****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
In Asp.Net Calender control, how to display 5 lines if there are only 5
lines in one month? Now there are 6 lines even that I don't show the
data in other months.

Nov 19 '05 #2
Hi, Juan:

It works if I set ShowGridLines = False, but not if ShowGridLines =
True.

Nov 19 '05 #3
Hmmm...that's odd but, if that what it takes, fine.

See the calendar at :

http://asp.net.do/calendario/Calendario.aspx

It's created with only :

<asp:Calendar ID="Calendar1" runat="server" OtherMonthDayStyle-BackColor="White"
OtherMonthDayStyle-ForeColor="White"></asp:Calendar>

I didn't set ShowGridLines = False ... but it works.

In any case, I'm glad it's working, Jack.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Jack" <ls*****@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi, Juan:

It works if I set ShowGridLines = False,
but not if ShowGridLines = True.

Nov 19 '05 #4
Yes, I know your solution, but my customer need GridLine. :(

Nov 19 '05 #5
I guess you'll have to write a Calendar of your own, then.

Why would your customer require gridlines ?

Talk your customer out of that.
It's not like gridlines are very functional, anyway.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Jack" <ls*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Yes, I know your solution, but my customer need GridLine. :(

Nov 19 '05 #6
:), in fact, I think Calender with GridLine is more beautiful than the
one without GridLine.

Nov 19 '05 #7
But not if it displays unneeded lines, right ?

;-)

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Jack" <ls*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
:), in fact, I think Calender with GridLine is more beautiful than the
one without GridLine.

Nov 19 '05 #8
Yes, that's true, but that's why I post here.
If you can tell me how to custom Calendar, that's better. ;)

Nov 19 '05 #9
Which method or event in Calendar shall I override?

Nov 19 '05 #10

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

Similar topics

8
by: PerryC | last post by:
I want to be able to accomplish this, please help: When click on the DOB field, a ActiveX Calender popup and the user choose a date, the value is automatically refreshed in the DOB field in the...
1
by: Alicia | last post by:
I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 ...
1
by: Jessica Weiner | last post by:
I have an ASP .NET web application and I am using the calender control to display the month view and some events that are scheduled to happen during the month. Whenever the user selects a month,...
1
by: 848lu | last post by:
hey i really need help...i got this code....basically im suppose to make a calender that allows a user to type in month and year .... and the calander displays it on the scree using...
1
osward
by: osward | last post by:
Hi everyone, Background 1. I have a table that consits 400+ rows of data and is growing by day. The table already has paging links at the bottom but I restricted to display rows of data only >=...
1
by: Mohammed Rafeeq Ahmed | last post by:
hi All, I am using the following code to display the calender html pages in IFRAME automatically using javscript <script language="JavaScript"> var d = new Date(); var month =...
7
by: gubbachchi | last post by:
Hi all, In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
6
nomad
by: nomad | last post by:
Hello Everyone: I'm having troubles with some coding and Idon't know where it is. I have delevopled a calender where the client can add events to a day. The code worked perfect on my computer but...
1
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.