This is my blog when the processing method, there is no real value *_+, here posted.
By the way, to help friends ...
http://community.csdn.net/Expert/topic/4716/4716187.xml?temp=.4245722
As follows:
private void Blogcal_prerender (object sender, System.EventArgs e)
... {
The day before the calendar is set up processing #region the week name before the calendar is established
Thread threadcurrent = Thread.CurrentThread;
CultureInfo cinew = (CultureInfo) threadCurrent.CurrentCulture.Clone ();
CiNew.DateTimeFormat.DayNames = new string[] ... {"Day", "one", "two", "three", "four", "five", "six"};
CiNew.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday;
Threadcurrent.currentculture = cinew;
System.Globalization.CultureInfo Cinfo =
(System.Globalization.CultureInfo) System.Globalization.CultureInfo.CurrentCulture.Clone ();
CInfo.DateTimeFormat.DayNames =new string[]{"Monday", "Two", "three", "four", "five", "six", "Seven"};
System.Threading.Thread.CurrentThread.CurrentCulture = Cinfo;
#endregion
}
private void Blogcal_dayrender (object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
... {
Handle days with log and style of calendar #region the style of days and calendars with log
The control occurs each day when it is created.
CalendarDay d = ((Dayrendereventargs) e). Day;
Common.js (D.date.month.tostring ());
Common.js (D.date.day.tostring ());
TableCell c = ((Dayrendereventargs) e). Cell;
Initializes an array of dates with blogs for the current month
if (intpremonth = 0)
... {
Intpremonth = D.date.month; Note: The first month we get when the Calendar control is initialized is not the current month, but the month of the first one months
Intcurrentmonth = intpremonth+1;
Common.js (Intcurrentmonth.tostring ());
if (intcurrentmonth>12)
intcurrentmonth=1;
Intnextmonth = intcurrentmonth+1;
if (Intnextmonth >12)
Intnextmonth = 1;
Arrpredays = Getarrayday (d.date.year,intpremonth); Get an array of dates with blogs for the first one months
Arrcurrentdays = Getarrayday (d.date.year,intcurrentmonth);//Get an array of dates with blogs for the month
Common.js (Arrcurrentdays.tostring ());
Arrnextdays = Getarrayday (d.date.year,intnextmonth);//Get an array of dates for next month's blog
}
int j=0;
if (D.date.month.equals (Intpremonth))
... {
while (! arrpredays[j]. Equals (0))
... {
if (D.date.day.equals (Arrpredays[j]))
... {
C.controls.clear ();
C.controls.add (New LiteralControl ("<a href= ' default.aspx?log_year=" +d.date.year+ "&log_month=" +d.) date.month+ "&log_day=" +d.date.day+ "' title= ' view the log published on that day ' ><font color= #C04000 > ' +d.date.day+ ' </font ></a> "));
C.controls.add (New LiteralControl ("<a href= '" +d.date.year+ "/" +d.date.month+ "/" +d.date.day+ "/' title= ') View the journal published on the Day ' ><font color= #C04000 > ' +d.date.day+ ' </font></a> '));
}
j + +;
}
}
else if (d.date.month.equals (Intcurrentmonth))
... {
while (! arrcurrentdays[j]. Equals (0