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 }); }
When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include Initialization, Instantiating controls, restoring and maintaining state, running event handler code, and rendering.
(1)Page Initialization = Page_Init
(2)View State Loading = LoadViewState
(3)PostBack data processing = LoadPostData
(4)Page Loading = Page_Load
(5)PostBack Change Notification = RaisePostDataChangedEvent
(6)PostBack Event Handling = RaisePostBackEvent
(7)Page Pre Rendering Phase = Page_PreRender
(8)View State Saving = SaveViewState
(9)Page Rendering = Page_Render
(10)Page Unloading = Page_UnLoad
Comments
Post a Comment