Click here to Skip to main content
16,004,854 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Scanner in ASP .NET Pin
l0kke12-Sep-06 6:19
l0kke12-Sep-06 6:19 
QuestionAdding time in ASP.Net Pin
sarvanjonty11-Sep-06 23:51
sarvanjonty11-Sep-06 23:51 
AnswerRe: Adding time in ASP.Net Pin
_AK_12-Sep-06 0:18
_AK_12-Sep-06 0:18 
AnswerRe: Adding time in ASP.Net Pin
l0kke12-Sep-06 6:27
l0kke12-Sep-06 6:27 
Question2.0 Calendar populated from database? [modified] Pin
munklefish11-Sep-06 23:46
munklefish11-Sep-06 23:46 
AnswerRe: 2.0 Calendar populated from database? Pin
mbbisht12-Sep-06 1:48
mbbisht12-Sep-06 1:48 
GeneralRe: 2.0 Calendar populated from database? Pin
munklefish12-Sep-06 2:49
munklefish12-Sep-06 2:49 
GeneralRe: 2.0 Calendar populated from database? Pin
l0kke12-Sep-06 6:50
l0kke12-Sep-06 6:50 
If you just want to display text within day cell, then you can use DayRender method in your own class MyCalendar, which extends Calendar control.

class MyCalendar : Calendar
{
private ArrayList myEvents;

public MyCalendar() : base()
{
DayRender += new DayRenderEventHandler(myCalendar_DayRender);
}

protected override OnPreRender(object sender, EventArgs e)
{
DateTime visibleDate = (VisibleDate > new DateTime(2000, 1, 1)) ? VisibleDate : TodaysDate;

myEvents = LoadEventsFromDatabase(visibleDate.Month, visibleDate.Year);
}

void MyCalendar_DayRender(object sender, DayRenderEventArgs e)
{
for(int i=0; i < myEvents.Count; i++)
{
if (((MyEvent)myEvents[i]).Date.Day == e.Day.Date.Day)
{
e.Cell.Controls.Add(new LiteralControl("<br/>" + ((MyEvent)myEvents[i]).EventTitle);
}
}
}
}

I suppose you created MyEvent class with two properties, DateTime Date and string EventTitle.

And you have a method LoadEventFromDatabase, which queries database, retrieves events and transform them into ArrayList of MyEvent objects (or you can use generic List<MyEvent> instead of ArrayList)

I hope it works Smile | :)

Pilo
GeneralRe: 2.0 Calendar populated from database? Pin
munklefish12-Sep-06 8:12
munklefish12-Sep-06 8:12 
Questioncookielss sessionState Pin
mbbisht11-Sep-06 23:04
mbbisht11-Sep-06 23:04 
AnswerRe: cookielss sessionState Pin
Dario Solera11-Sep-06 23:12
Dario Solera11-Sep-06 23:12 
AnswerRe: cookielss sessionState Pin
Guffa11-Sep-06 23:20
Guffa11-Sep-06 23:20 
Questionsend gridview within mail Pin
Maksi11-Sep-06 23:02
Maksi11-Sep-06 23:02 
Questioncookiless sessionState Pin
mbbisht11-Sep-06 23:02
mbbisht11-Sep-06 23:02 
AnswerRe: cookiless sessionState Pin
Sathesh Sakthivel12-Sep-06 0:07
Sathesh Sakthivel12-Sep-06 0:07 
QuestionHi to One & All Pin
narendrakumarp11-Sep-06 22:53
narendrakumarp11-Sep-06 22:53 
AnswerRe: Hi to One & All Pin
CWIZO11-Sep-06 22:57
CWIZO11-Sep-06 22:57 
QuestionHow to make application suitable on all Resolutions Pin
King Shez11-Sep-06 22:37
King Shez11-Sep-06 22:37 
AnswerRe: How to make application suitable on all Resolutions Pin
mbbisht11-Sep-06 22:41
mbbisht11-Sep-06 22:41 
GeneralRe: How to make application suitable on all Resolutions Pin
King Shez11-Sep-06 23:48
King Shez11-Sep-06 23:48 
QuestionHow to make application suitable on all Resolutions Pin
King Shez11-Sep-06 22:37
King Shez11-Sep-06 22:37 
Questioni wanna search engine Pin
aush11-Sep-06 21:55
aush11-Sep-06 21:55 
AnswerRe: i wanna search engine Pin
CWIZO11-Sep-06 22:58
CWIZO11-Sep-06 22:58 
GeneralRe: i wanna search engine Pin
aush11-Sep-06 23:31
aush11-Sep-06 23:31 
GeneralRe: i wanna search engine Pin
CWIZO12-Sep-06 0:04
CWIZO12-Sep-06 0:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.