G
Guest
Get the following code to compile using .NET 2.0. You can use VS Team Studio,
the command line complier, etc.
The restrictions are:
1. Place no code in the APP_CODE folder.
2. Do not create a second project that is referenced by the first.
The code is extremely simple:
1. Create a new web site
2. Add a new class to the project
3. In the Page_Load handler of default.aspx.cs, create a reference to the
new class.
For example:
in file Default.aspx.cs
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TestClass tc = new TestClass();
}
}
in file TestClass.cs
public class TestClass
{
public TestClass()
{
}
}
That's it! Simple, yet, the code will not compile as is.
the command line complier, etc.
The restrictions are:
1. Place no code in the APP_CODE folder.
2. Do not create a second project that is referenced by the first.
The code is extremely simple:
1. Create a new web site
2. Add a new class to the project
3. In the Page_Load handler of default.aspx.cs, create a reference to the
new class.
For example:
in file Default.aspx.cs
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TestClass tc = new TestClass();
}
}
in file TestClass.cs
public class TestClass
{
public TestClass()
{
}
}
That's it! Simple, yet, the code will not compile as is.