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 }); }
Yes, we can take multiple web.config files in the single asp.net application. If we have a single directory then we can add multiple config file with different name. If you want to access xml tag from config file then you can access only web.config file elements. Lets take an simple example of the file. web.config file <configuration> <appSettings> <add key="first" value="My first web.config file"/> </appSettings> </configuration> Default.aspx file <asp:Label ID="Label1" runat="server" Text="<%$appSettings:first%>"></asp:Label> Its working fine, but when we take another config file in the application then get the error like file not found error. So, i have a solution of this problem. Follow the mentioned steps to overcome this problem: Step-1 : Add a new directory in the solution(application) Step-2 : Add new web.config file in the new