例如:
例如: public class ExampleViewModel { public int Id { get; set; } }
例如: public IActionResult ExampleAction(ExampleModel model) { // Do something with model.Id return View(); }
public class ExampleModel { public int Id { get; set; } // Other properties to bind here }
例如: $.ajax({ type: "POST", url: "/ExampleController/ExampleAction", data: { id: $("#exampleId").val() }, success: function (result) { // Handle success }, error: function (result) { // Handle error } });