Horje
forces the user to enter his password before submitting the form asp.net core Code Example
forces the user to enter his password before submitting the form asp.net core
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
var verifyPassword = UserManager.PasswordHasher.VerifyHashedPassword(user.PasswordHash, password);
if (verifyPassword == PasswordVerificationResult.Failed)
{
    ModelState.AddModelError("", "Password incorrect.");
    // If password is incorrect, ModelState will be invalid now
}

if (ModelState.IsValid)
{
    // save posted data
}




Csharp

Related
select list that does not exis in another C# list Code Example select list that does not exis in another C# list Code Example
razor: show editable list Code Example razor: show editable list Code Example
web3.fromWei(eth.getBalance(eth.coinbase)); Code Example web3.fromWei(eth.getBalance(eth.coinbase)); Code Example
dinero en C# Code Example dinero en C# Code Example
use different database with entitymanagerfactory Code Example use different database with entitymanagerfactory Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13