Html.EditFor Onchange Event

前端 未结 4 1723
南旧
南旧 2021-01-04 13:36

I am developing an MVC4 application.
I want to change IsChanged field in my Model, when model.ExternalVenderNo is changed.

Bel

4条回答
  •  悲哀的现实
    2021-01-04 13:51

    Try adding to attributes

    @Html.EditorFor(model => Model.Lengthofside1, new {  htmlAttributes = new { onchange = "OnChangeEvent(this)", @class = "form -control text-right" } })
    

    This worked for me.

提交回复
热议问题