5
我在通過jquery post方法調用重載的C#函數時遇到問題。如何在Asp.Net MVC中通過JQuery調用C#函數重載2
我在C#兩種功能現在
string func(string a)
string func(string a, string b)
當我打電話其中有這樣
var url = '<%= Url.Action("func", "Team") %>';
$.post(url, { a: "test" }, function (data) {
});
jQuery的一個參數,它給了我這個錯誤
The current request for action 'func' on controller type 'TeamController' is
ambiguous between the following action methods
我功能想知道我該如何調用這些重載函數。 即時通訊使用Asp.Net MVC 2與C#
@jim儘管標題和標籤可能暗示什麼,但這個問題幾乎沒有*只做JavaScript或jQuery –
在火車上自動糾正讓我,「只是」應該是「與」,爲最後的評論有道理 –
我也面臨這種情況,但在Web窗體而不是MVC。使用null作爲解決方法。 –