I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
If you want to bind the text box with the instance of customer class object also call one way binding in wpf. first to add a cs class in the project. In which you should take one or more public properties , i will take two public properties and one static method. That static method will return class object. Now, your code look like: 1. Add a Class in the project also paste the below mentioned code. But remember that your class name is match with csharp file name; namespace name match with code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SplashSCreen { public class Student { public string Name { get; set; } public string Email { get; set; } public static Student GetRecord() { var student = new Student(); { student.Name = "Jacob"; student.Email = "narenkumar851@gmail.co