Javascript 未捕获引用错误:未定义自动填充
我已经创建了web服务,并试图通过启用其“ScriptService”属性从java脚本调用它。但我得到了控制台错误“uncaughtreferenceerror:AutoFill未定义”,我已经在脚本管理器中注册了它的引用,但运气不好 自动填充.asmxJavascript 未捕获引用错误:未定义自动填充,javascript,web-services,asp.net-ajax,asp.net-webpages,scriptservice,Javascript,Web Services,Asp.net Ajax,Asp.net Webpages,Scriptservice,我已经创建了web服务,并试图通过启用其“ScriptService”属性从java脚本调用它。但我得到了控制台错误“uncaughtreferenceerror:AutoFill未定义”,我已经在脚本管理器中注册了它的引用,但运气不好 自动填充.asmx namespace eService { /// <summary> /// Summary description for AutoFill /// </summary> [WebService(Namespace
namespace eService
{
/// <summary>
/// Summary description for AutoFill
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class AutoFill : WebService
{
[WebMethod(EnableSession = true)]
public string DismissAlertNotification(int ID, int CompanyID, string SectionName)
{
}
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="header.ascx.cs" Inherits="ePrint.Templates.header" %>
<asp:ScriptManagerProxy ID="smproxy" runat="server">
<Services>
<asp:ServiceReference Path="~/EprintService/AutoFill.asmx" />
</Services>
</asp:ScriptManagerProxy>
<script type="text/javascript" language="javascript">
function dismiss_alert_notification(ID, CompantID, SectionName) {
AutoFill.DismissAlertNotification(ID, CompantID, SectionName, onResponse);
}
</script>
namespace电子服务
{
///
///自动填充的摘要说明
///
[WebService(命名空间=”http://tempuri.org/")]
[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
//要允许使用ASP.NET AJAX从脚本调用此Web服务,请取消注释以下行。
[System.Web.Script.Services.ScriptService]
公共类自动填充:WebService
{
[WebMethod(EnableSession=true)]
公共字符串DismissAlertNotification(int-ID、int-CompanyID、string-SectionName)
{
}
标题.ascx
namespace eService
{
/// <summary>
/// Summary description for AutoFill
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class AutoFill : WebService
{
[WebMethod(EnableSession = true)]
public string DismissAlertNotification(int ID, int CompanyID, string SectionName)
{
}
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="header.ascx.cs" Inherits="ePrint.Templates.header" %>
<asp:ScriptManagerProxy ID="smproxy" runat="server">
<Services>
<asp:ServiceReference Path="~/EprintService/AutoFill.asmx" />
</Services>
</asp:ScriptManagerProxy>
<script type="text/javascript" language="javascript">
function dismiss_alert_notification(ID, CompantID, SectionName) {
AutoFill.DismissAlertNotification(ID, CompantID, SectionName, onResponse);
}
</script>
函数解除警报通知(ID、CompantID、SectionName){
自动填充。DismissAlertNotification(ID、CompanyTID、SectionName、onResponse);
}