我想在Web服务(.asmx文件)内运行函数。
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: '/Admin/WebSrvcs/Management.asmx/f_SearchLabel',
data: "{_sQuery:'" + obj.value + "'}",
dataType: "json",
但我不知道我的根URL将在哪里(http://localhost:4399/VirDir或其他地址可能会出现)内嵌在JS文件中。我需要到达应用程序的根文件夹才能找到asmx文件。
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: 'http://localhost:4399/virDir/Admin/WebSrvcs/Management.asmx/f_SearchLabel',
data: "{_sQuery:'" + obj.value + "'}",
dataType: "json",
我正在使用Visual Studio 2008并使用C#构建网站。
非常感谢您的任何帮助。