I am trying to make a number pad system to be used on touch screen devices where the user types in the numbers and the amount(partial view) is updated with the numbers entered.
After researching, it seems like the best method would be to use a [ChildActionOnly] action result in my controller so i have made this:
[ChildActionOnly]
public ActionResult TopUpAmountPartial(int number, decimal currentAmount)
{
var Result = new TopUpViewModel
{
//ignore this bit
Amount = currentAmount + 1
};
return PartialView(Result);
}
I tried doing a "Html.ActionLink" as the number pad button which sort of worked but loaded the whole page as a new one which is not what i want at all.
I've also seen the idea of "Html.RenderAction" thrown around but i have no idea how to get that to work with a button click.
Am I on the right tracks or do I just sound crazy?