We have a button id as " previewButton " in the Input HTML tag.

```
<button type="submit" id="previewButton"></span>Preview</button>
<button type="submit" id="submitButton"></span>Submit</button>

```

I need to fetch the Id = previewButton (or) submitButton in the Model.

```
public class MyTestViewModel : BaseModel
{
    public MyTestViewModel()
    {
        IsDateChanged = null;
        IsChanges = null;
    }

    public Guid ID { get; set; }

    [Required(ErrorMessage ="Required")]
    [Display(Name = "Determine the date has changed?")]
    public int? IsDateChanged { get; set; }

    [Required(ErrorMessage = "Required")]
    [Display(Name = "Is there any changes?")]
    public int? IsChanges { get; set; }

    public string PersonName { get; set; }

    [DataType(DataType.Date)]
    public DateTime PersonDOB { get; set; }

 }

```

Jquery :

```
$(document).ready(function () {
    $("button").click(function () {
        var clickedButtonName = $(this).val();
        $("#clickedButton").val(clickedButtonName);
        $('#previewButton').trigger('submit');
    });
});

```

Controller :

```
  public ActionResult New(MyTestViewModel viewModel, string ClickedButton)
    {
        var vm = ClickedButton;
        return View(vm);
    }

```

How to fetch HTML Input Button Id in c# - Model or Controller?