I have a Razor C # View in which I have a button. When I click on the button I capture by means of JS its respective ID, what I want is for that ID obtained, to be loaded in a current Model Attribute, for example @ Modelo.Id
my button:
< input type="button" name="pagin" value=@(i+1) id=@i onclick="return Pag(this)" />
Js method for OnClick:
function Pag(button) {
alert(button.value);
return false;
}
what I have inside alert, I want to load it to the model.