Solved

Styling Calendar object in c#.net-increasing calendar size in px

Posted on 2008-10-22
2
415 Views
Last Modified: 2012-05-05
Hi,

I'm trying to display a calendar using c# asp.net. I have a basic calendar but its too small and i cant figure out what properties i need to  use to change the size of the calendar, so that the calendar takes up 375 pixels by 250 px and also make each square that each date sits in larger to fill the larger calendar grid?

thanks Charlie
<asp:Calendar id="Calendar1"

     OnSelectionChanged="Date_Selected"

     SelectionMode="DayWeekMonth"

     Font-Name="Verdana" 

     Font-Size="12px"

     NextPrevFormat="ShortMonth"

     SelectWeekText="week"

     SelectMonthText="month"

     runat="server">

 

   <TodayDayStyle Font-Bold="True"/>

   <DayHeaderStyle Font-Bold="True"/>

   <OtherMonthDayStyle ForeColor="gray"/>

   <TitleStyle BackColor="#3366ff"

               ForeColor="white"

               Font-Bold="True"/>

 

   <SelectedDayStyle BackColor="#ffcc66"

                     Font-Bold="True"/>

   <NextPrevStyle ForeColor="white"

                  Font-Size="10px"/>

   <SelectorStyle BackColor="#99ccff" 

                  ForeColor="navy"

                  Font-Size="9px"/>

</asp:Calendar>

Open in new window

calendar.jpg
0
Comment
Question by:CharlieDev
2 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 22778637
add Width="375px" Height="250px" to the <asp:Calendar tag

try playing with Font-Size attribute
i tried using Font-Size="Larger" and Font-Size="X-Large" and they were filling the calendar quite well
0
 

Author Comment

by:CharlieDev
ID: 22780940
Thanks, I'm not at  my work pc at the moment but i'm sure that will do the job. I guess I should of just tried adding the size to the table as it was kind of obvious. Easy to say when you have the answer in front of you though, so thanks for the help.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now