You can use a profile provider if you use a web application instead of a website, but out of the box from the code for the aspx page, you cannot do it Profile.MyProperty.
, - . , - - , -.
" " , ProfileCommon
public class ProfileCommon
{
public Teachers Teachers
{
get
{
return (Teachers)
HttpContext.Current.Profile.GetPropertyValue("Teachers");
}
set
{
HttpContext.Current.Profile.SetPropertyValue("Teachers",value);
}
}
}
aspx
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;
}
ProfileCommon Profile.Teachers
public static class Profile
{
public static Teachers Teachers
{
}
}
, - ASP.NET.
,
, -. , TFS Build Manager -, -. , Microsoft -, -.