SmallHeader.cs 607 B

123456789101112131415161718192021222324
  1. using Microsoft.AspNetCore.Mvc;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace LotteryWebApp.Components
  7. {
  8. public class SmallHeaderModel
  9. {
  10. public String url;
  11. public String title;
  12. }
  13. public class SmallHeader : ViewComponent
  14. {
  15. public async Task<IViewComponentResult> InvokeAsync(String url, String title)
  16. {
  17. SmallHeaderModel model = new SmallHeaderModel();
  18. model.url = url;
  19. model.title = title;
  20. return View("SmallHeader", model);
  21. }
  22. }
  23. }