Profile小技巧
1、WebSite和WebApplication
WebSite中的Page里有属性Profile访问动态类ProfileCommon的实例,Profile有framework自动生成,继承自ProfileBase,主要提供了强类型访问Profile Property的能力。
2、读取Profile的用户标识(也就是UserName)
WebSite: Profile.UserName
WebApplication: Context.Profile.UserName
3、根据给定的userName读取Profile
WebSite: ProfileCommon pro = Profile.GetProfile(userName)
WebApplication:ProfileBase pro = ProfileBase.Create(userName)
转
http://teacherteng.blog.163.com/blog/static/257923142008769487506/