I'm up to page 285 and I'm getting two errors as described below.
Any clues?
Thanks
Ken
There is a red line underneath the term "Direction" in the line:
Code:
public Direction DisplayDirection { get; set; }
The error message says
"The type or namespace could not be found"
Note: I have created the "Direction.cs" file in the App_Code folder
ALSO
there is a red line under the term "DisplayDirection" in the line
Code:
switch (DisplayDirection)
The error message says:
"A switch expression or case label must be a bool,char,string,integral,enum or corresponding nullable type."
Here is the complete code for Banner.ascs.cs
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Controls_Banner : System.Web.UI.UserControl
{
public Direction DisplayDirection { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
HorizontalPanel.Visible = false;
VerticalPanel.Visible = false;
switch (DisplayDirection)
{
case Direction.Horizontal:
HorizontalPanel.Visible = true;
break;
case Direction.Vertical:
VerticalPanel.Visible = true;
break;
}
}
}