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 i run the SiteMapPath in visual studio 2010 then i found that it run successfully. When i run same sitemap file in visual studio 2013 then didn't run. I found the Error, that error is:
Now the solution is, remove .aspx extension of the url attribute from the web.sitemap file. Now you can see after removing the extension.
Now the output page of the file is:
.aspx extensionBecause visual studio 2013 support hide extension functionally or you can say it provide friendly url to the users. Like
http://localhost:25367/marketusHere, marketus is the page name, not a directory. So problem structure is:
Now the solution is, remove .aspx extension of the url attribute from the web.sitemap file. Now you can see after removing the extension.
Now the output page of the file is:
Comments
Post a Comment