
Untitled
By: a guest on
Jun 25th, 2012 | syntax:
None | size: 0.76 KB | hits: 11 | expires: Never
Use a Profile in an ASP.NET Web Application [closed]
public class ProfileCommon
{
public Teachers Teachers
{
get
{
return (Teachers)
HttpContext.Current.Profile.GetPropertyValue("Teachers");
}
set
{
HttpContext.Current.Profile.SetPropertyValue("Teachers",value);
}
}
}
ProfileCommon Profile = new ProfileCommon();
protected void Button1_Click(object sender, EventArgs e)
{
Teachers teachers = new Teachers();
teachers.Add(new Teacher("scott"));
teachers.Add(new Teacher("bob"));
teachers.Add(new Teacher("paul"));
Profile.Teachers = teachers;
}
public static class Profile
{
public static Teachers Teachers
{
//......
}
}