Check if dateTime is a weekend or a weekday
问题 <script Language="c#" runat="server"> void Page_Load() { DateTime date = DateTime.Now; dateToday.Text = " " + date.ToString("d"); DayOfWeek day = DateTime.Now.DayOfWeek; dayToday.Text = " " + day.ToString(); if ((dayToday == DayOfWeek.Saturday) && (dayToday == DayOfWeek.Sunday)) { Console.WriteLine("This is a weekend"); } } </script> Using dateTime, I am trying to test whether or not the current date is a weekday or weekend, then I would like to print the response to the user. Currently I am