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 }); }
Also you can say how to deploy a mvc project from inbuilt
server to another server such as
Before address -- localhost:34376
After Address-- localhost:8080
Step-1 : Open Visual studio in administrator mode.
Step-2: Open your MVC
project
Step-3: Right Click on Your MVC project name and select
properties.
Step-4: In open window (below snap) , your application run
on default server port such as 34376
Step-5 : Save your
application and run.
Step-6 : Again open project property window and change your
current server to local server also click to create virtual directory button,
check below snap
Step-7: Save your
Application and run
Comments
Post a Comment