Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @page
- @using WebUi
- @model identifyModel
- <h2>Логин</h2>
- <p>@Model.Login</p>
- <h2>Пароль</h2>
- <p>@Model.Password</p>
- -------------------------------------------------------------
- using Microsoft.AspNetCore.Mvc.RazorPages;
- namespace WebUi
- {
- public class identifyModel : PageModel
- {
- public identifyModel() { }
- public bool IsCorrect { get; set; }
- public string Token { get; set; }
- public string Login { get; set; }
- public string Password { get; set; }
- public void OnPost(string login,string password)
- {
- if (string.IsNullOrWhiteSpace(login) || string.IsNullOrWhiteSpace(password))
- {
- IsCorrect = false;
- return;
- }
- this.Login = login;
- this.Password = password;
- }
- }
- }
Add Comment
Please, Sign In to add comment