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 }); }
An event is generated when a user performs an action, such as clicking the mouse or pressing a key. When a user clicks a form, the clicks event is generated for the form.
Each form and control has a predefined set of events associated with it. You can instruct an application to perform a specific action when an event takes place. For example, you can write code for adding items to a list as soon as a form is loaded.
Click : Occurs when a user clicks anywhere on a form.
DoubleClick : Occurs when the component is double-clicked.
FormClosed : Occurs when a form is closed.
Deactivate : Occurs when a form losses focus and is no longer active.
Load : Occurs when a form is loaded in the memory for the first time. This event can be used to initialize variables used in a form. This event can also be used to specify the initial values to be displayed in various controls in a form.
MouseMove : Occurs when a mouse is moved over a form.
MouseDown : Occurs when the left mouse button is pressed on a form.
MouseUp : Occurs when the mouse button is released.
You can specify the action to be performed on the occurrence of an event within a special method called, event handler. You can add code for an event handler by using the code Editor window.
To write code for an event corresponding to an object, open the properties window for that object.
Each form and control has a predefined set of events associated with it. You can instruct an application to perform a specific action when an event takes place. For example, you can write code for adding items to a list as soon as a form is loaded.
Click : Occurs when a user clicks anywhere on a form.
DoubleClick : Occurs when the component is double-clicked.
FormClosed : Occurs when a form is closed.
Deactivate : Occurs when a form losses focus and is no longer active.
Load : Occurs when a form is loaded in the memory for the first time. This event can be used to initialize variables used in a form. This event can also be used to specify the initial values to be displayed in various controls in a form.
MouseMove : Occurs when a mouse is moved over a form.
MouseDown : Occurs when the left mouse button is pressed on a form.
MouseUp : Occurs when the mouse button is released.
You can specify the action to be performed on the occurrence of an event within a special method called, event handler. You can add code for an event handler by using the code Editor window.
To write code for an event corresponding to an object, open the properties window for that object.
Comments
Post a Comment