How can I pass a value entered in a texbox to a PartialViewResult?

后端 未结 1 1878
终归单人心
终归单人心 2021-01-28 14:31

I am creating an MVC app where the user can add items to their cart. They can also make partial payments on certain items so I have a TextBox for them to specify how much they w

相关标签:
1条回答
  • 2021-01-28 14:46

    you might try doing an ajax call

    $('.Link').on('click', function(){
        $.ajax({
            url: "@(Url.Action("AddAssignedFee", "Controller")",
            type: "POST",
            data: { textValue: $('.PaymentAmount').val(), data2: 'data2' }
            cache: false,
            async: true,
            success: function (result) {
                $(".Content").html(result);
            }
        });
    });
    

    Hopefully this helps

    0 讨论(0)
提交回复
热议问题