关于入门经典中WEB编程,创建强类型Previouspage示例
public class RegistrationInformation {
public RegistrationInformation()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
public struct RegistrationInformation
{
private string firstname;
public string Firstname
{
get { return firstname; }
set { firstname = value; }
}
private string lastname;
public string Lastname
{
get { return lastname; }
set { lastname = value; }
}
private string email;
public string Email
{
get { return email; }
set { email = value; }
}
private string selectedevent;
public string SelectedEvent
{
get { return selectedevent; }
set { selectedevent = value; }
}
}
}
以上是创建的类,
以下我在default_aspx类添加公共属性RegistrationInformation
public RegistrationInformation RegistrationInformation
{
get
{
RegistrationInformation ri = new RegistrationInformation();
ri.-----
}
}
我发现照书上说ri应该有firstname和lastname等属性,但实际上没有,不知道我的代码错在那里
这一节是在入门经典3的500页,高人们帮忙看一下吧,不懂的地方可以看一下附件
sw.rar
(6.85 KB)