OK I had C/C++ programming classes a few years ago and now I'm taking a ASP.net class and programming in C#. I need a little help with an assingment. We have to create an if state to display text depending on if the day of the week is a weekday vs weekend. I was able to get the time to dispaly ok. This next step I was taking before I created my if conditions was to try and display the day of the Week. Which I am unable to do. Any help would be appreciated. Also I don't have a compiler to test my code. I was trying to view the errors in IE. I added a web.config file to the root of my directory but it still does not give my an error description. Not sure if I have it in the correct place.
Here is the code for my program:
[
<script Language="c#" runat="server">
void Page_Load()
{
DateTime CurrentTime;
DateTime MyTime;
CurrentTime = DateTime.Now;
MyTime = DayOfWeek.Now;
message1.Text = "<br>The current time is: " + CurrentTime;
message2.Text = "<br>The Day of the week is: "+ MyTime.DayOfWeek.ToString();
}
</script>
<html>
<head><title>Assignment2</title></head>
<body>
<h1>Assignment 2</h1>
Cassandra Jackson ECT 310</a>
<asp:label id="message1" runat="server"/>
<asp:label id="message2" runat="server"/>
</body>
</html>