profile小发现
每次调用Profile类的时候都会触发dbo.aspnet_Profile_GetProperties()存储过程,所以将profile存入session也许是个好办法。
存储
Session.Add("profile", Profile);
读取
if (Session["profile"] != null)
{
ProfileCommon sessionProfile = (ProfileCommon)Session["profile"];
Label1.Text = sessionProfile.location;
Label2.Text = sessionProfile.zipcode;
}
posted on 2009-02-06 15:02 WayToDotNET 阅读(139) 评论(0) 编辑 收藏 举报