Guest User

Untitled

a guest
Jun 22nd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. @page
  2. @using WebUi
  3. @model identifyModel
  4.  
  5. <h2>Логин</h2>
  6. <p>@Model.Login</p>
  7. <h2>Пароль</h2>
  8. <p>@Model.Password</p>
  9.  
  10. -------------------------------------------------------------
  11.  
  12. using Microsoft.AspNetCore.Mvc.RazorPages;
  13.  
  14. namespace WebUi
  15. {
  16. public class identifyModel : PageModel
  17. {
  18. public identifyModel() { }
  19.  
  20. public bool IsCorrect { get; set; }
  21. public string Token { get; set; }
  22.  
  23. public string Login { get; set; }
  24. public string Password { get; set; }
  25.  
  26. public void OnPost(string login,string password)
  27. {
  28. if (string.IsNullOrWhiteSpace(login) || string.IsNullOrWhiteSpace(password))
  29. {
  30. IsCorrect = false;
  31. return;
  32. }
  33.  
  34. this.Login = login;
  35. this.Password = password;
  36.  
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment