I have Edit Action with Html.BeginForm. How can I add HTML attributes?
I know only one way:
@using (Html.BeginForm("Edit", "Clients", FormMethod.Post, new { @class="example"})) {
}
but if I use this method I cannot pass current ID
Is it possible to add HTML attributes to form without modifying action URL?
FormMethod.Getor whatever instead ofFormMethod.Posthere if you want to.@using (Html.BeginForm("Edit", "Clients", FormMethod.Post, new { @class="example", id = Model.Id}))Is this you are looking for or what is the exact problem?