I have a page handler that has a complex property for model binding. I want to access the property to the razor page so I can use the tag helpers to generate the form inputs from the property.
This is my page handler:
public async Task<IActionResult> OnPostChangePassword(PasswordChangeInput Input)
{
// Some code
}
I want to access the property so I can use it with asp-for
@page
@model EditPasswordModel
@
{
//Some code
}
<form method="post">
<div class="flex justify-between my-1">
<label class="text-gray-700" for="cus_name">Password:</label>
<input asp-for="Input.Password" class="px-3 py-1 text-gray-900" />
</div>
<div class="flex justify-between my-1">
<label class="text-gray-700" for="cus_name">Confirm Password:</label>
<input asp-for="Input.ConfirmPassword" class="px-3 py-1 text-gray-900" />
</div>
<div>
<input type="submit" />
</div>
</form>