Chapter 8, p. 284 Try it out using C#:
I created the enum using the directions in the book.
The class file "Direction" looks like this (I checked my code against the source I downloaded for the book and the two files appear to be identical):
Code:
public enum Direction
{
Horizontal,
Vertical
}
At step 4 I add the following code as specified to the code-behind of "Banner.ascx" like this:
Code:
public partial class Controls_Banner : System.Web.UI.UserControl
{
public Direction DisplayDirection { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
...
}
}
Intellisense balks on the Direction property, the error msg is "the type or namespace name Direction cannot be found...."
I ran through everything up to this point twice in the chapter, deleting the user control and the class file and recreating them each time.
Any ideas on what I'm doing incorrectly?
Thanks for your help (and thanks for an easy-to-follow primer on .NET 4)!