Hello,
I want to Show all Users on a Page. I am storing Profile info in a Separate table called UserProfileInfo. All is working ok. In a foreach loop when I get the FirstName or other fields stored in UserProfileInfo table it give error all the time in WebForms
Application in VS 2013, .Net 4.5.1 and Identity 2.0...
Here is my code
public class ApplicationUser : IdentityUser
{
public virtual UserProfileInfo UserProfileInfo { get; set; }
}
public class UserProfileInfo
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
WebForm Code Behind to Load all Users
private ApplicationDbContext context;
private UserManager manager;
public List allUser;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
allUser = manager.Users.ToList();
foreach (var ...
Go to the complete details ...