[英]Problem calling WebMethod in asp.Net Webform
I'm calling a WebMethod inside my application.我在我的应用程序中调用 WebMethod。 Recently i changed the root config to upgrade the multilingual part.
最近我更改了根配置以升级多语言部分。
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("languageHome","{language}/{page}","~/{page}.aspx");
}
Since then it seem that i cannot call the WebMethod with jQuery从那时起,我似乎无法使用 jQuery 调用 WebMethod
function ShowNumeroLame() {
$.ajax({
type: "POST",
url: "Home/GetNumeroLame",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessNumeroLame,
error: function () {
},
failure: function (response) {
}
});
}
I think that the problem is in the URL but i can't find it我认为问题出在 URL 但我找不到
Thanks, and sorry for my bad explanation谢谢,对不起我的错误解释
I solved the problem adding this:我解决了这个问题:
url: '<%=Page.ResolveClientUrl("Home.aspx/GetSpessoriFette") %>',
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.