I want to hide the input which is in a
(new { htmlAttributes = new { @type = "number", @min = "1", @max="99", @placeholder = "Number of ???" } })
when the post method is actually triggered, I want it to hide the input afterward.
Here's the form number input and button input.
I've seen this How to make @Html.EditorFor invisible?
//cshtml
@using (@Html.BeginForm("ConfirmOrder", "Home", FormMethod.Post))
{
    @Html.EditorFor(model => model.Number, new { htmlAttributes = new { @type = "number", @min = "1", @max = "99", @placeholder = "Number of ???" } })
    <input type="submit" value="Confirm" />
}
//cshtml.cs code
public class DetailsModel : PageModel
    {
        private readonly ShopDashboard.Models.ShopDashboardContext _context;
public DetailsModel(ShopDashboard.Models.ShopDashboardContext context)
    {
        _context = context;
    }
    public int Number { get; set; }
    public Order Order { get; set; }
    public async Task<IActionResult> OnGetAsync(string id)
    {
        if (id == null)
        {
            return NotFound();
        }
Order = await Task.Run(() => Post.GetOrders().FirstOrDefault(m => m.Id == id));
if (Order == null)
{
    return NotFound();
}
return Page();
}
public async Task<IActionResult> OnPostAsync(string id, int Number = -1)
{
if (id == null)
        {
            return NotFound();
        }
 Order = await Task.Run(() => Post.method().FirstOrDefault(m => m.Id == id));
if (Order != null)
        {
            IActionResult result;
            if (Number == -1)
            {
                result = new OkObjectResult(JsonConvert.DeserializeObject(Post.method().Content));
                return result;
            }
            MediaTypeHeaderValue mediaTypeHeaderValue = new MediaTypeHeaderValue("application/pdf");
            IRestResponse response = Post.method();
            result = new ContentResult() { Content = response.Content };
            if (response.IsSuccessful)
            {
                FileContentResult contentResult = new FileContentResult(response.RawBytes, mediaTypeHeaderValue.MediaType)
                {
                    FileDownloadName = "???" + response.Headers
                    .Where(header => header.Name == "Content-Disposition").First()
                    .Value.ToString().Split("=")[1].Split("?").First() + ".pdf"
                };
                result = contentResult;
            }
            return result;
        }
        return Page();
}