Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
164 Points
538 Posts
Apr 03, 2012 07:24 AM|LINK
cninjas protected void Page_Load(object sender, EventArgs e) { dtholidays1 = FetchHoliday(); } protected void calDT_DayRender(object sender, DayRenderEventArgs e) { DataRow[] result = dtholidays1.Select("day_Text = '" + e.Day.Date + "'"); if (result != null && result.Length > 0) { e.Cell.Controls.Add(new LiteralControl("<br /><font color=red>Holiday</font>")); HyperLink link = new HyperLink(); link.CssClass = "activity"; link.ImageUrl = "del.png"; link.ToolTip = e.Day.Date.ToString(); link.NavigateUrl = Page.ClientScript.GetPostBackClientHyperlink(CalendarLinkButton, e.Day.Date.ToString(), true); e.Cell.Controls.Add(link); } } and my data for date from the database is day_Text 27-02-2012 00:00:00 02-03-2012 00:00:00 27-03-2012 00:00:00 Hope it helps you now..thanks... refer to my previous post for button click and other stuffs...thanks,
protected void Page_Load(object sender, EventArgs e) { dtholidays1 = FetchHoliday(); } protected void calDT_DayRender(object sender, DayRenderEventArgs e) { DataRow[] result = dtholidays1.Select("day_Text = '" + e.Day.Date + "'"); if (result != null && result.Length > 0) { e.Cell.Controls.Add(new LiteralControl("<br /><font color=red>Holiday</font>")); HyperLink link = new HyperLink(); link.CssClass = "activity"; link.ImageUrl = "del.png"; link.ToolTip = e.Day.Date.ToString(); link.NavigateUrl = Page.ClientScript.GetPostBackClientHyperlink(CalendarLinkButton, e.Day.Date.ToString(), true); e.Cell.Controls.Add(link); } }
and my data for date from the database is
day_Text 27-02-2012 00:00:00 02-03-2012 00:00:00 27-03-2012 00:00:00
Hope it helps you now..thanks...
refer to my previous post for button click and other stuffs...thanks,
What is day_Text? Is it the column name of your database table?
coolpal9
Member
164 Points
538 Posts
Re: calendar control: how to remove holidays and update it in the database
Apr 03, 2012 07:24 AM|LINK
What is day_Text? Is it the column name of your database table?