When the submit button is clicked, I would like the form to be sent using the post method. Thank you for your assistance.
Here is the HTML code:
<form method="post" class="form-horizontal editor-horizontal">
<div class="form-group">
<div class="col-sm-9">
<a href="#" id="name" data-type="text"
data-pk="1" data-placeholder="Required"
data-title="Enter Your Name"&bt;@Model.Information.Doctor.Name</a>
</div>
<label class="col-sm-3 control-label">Name</label>
</div>
<div class="form-group">
<div class="col-sm-9">
<a data-pk="1" data-placeholder="Required" data-placement="left"
data-title="Enter Your Last Name" data-type="text"
href="#" id="family" >@Model.Information.Doctor.Family</a>
</div>
<label class="col-sm-3 control-label">Last Name </label>
</div>
<button type="submit" class="btn btn-primary" >Submit</button>/>
</form>
This is my post method:
public IActionResult OnPost(EditDoctorViewModel command)
{
var user= _service.EditDoctor(command);
return Page();
}