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 }); }
- Java Script can put dynamic text into an HTML page- using HTML, you can produce only static pages but javascript add dynamic functionality in HTML. A javascript statement like this: document.write("<h1>"+name+"</h1>") can write a variable text into an HTML page.
- JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but javascript is a scripting language with a very simple syntax. Almost anyone can put small "snippets" of code into their HTML page.
- JavaScript can be used to Validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing.
- JavaScript can react to events - Java script provide the concepts of events handling. A JavaScript can be set to execute when something happens like when a page has finished loading or when a user clicks on an HTML element. Eg button.
- Java Script can read and write HTML elements- A JavaScript can read and change the content of an HTML element.
- Java Script can be used to detect the visitor's browser - A Java Script can be used to detect the visitor's browser, and - depending on the browser-load another page specifically designed for the browser.
- Java Script can be used to create cookies - A Java Script can be used to store and retrieve information on a visitor's computer.
Comments
Post a Comment