I have created web service and trying to call it from java script by enabling its "ScriptService" attribute. But i am getting console error "Uncaught ReferenceError: AutoFill is not defined" I have registered its reference in script manager but no luck.
AutoFill.asmx
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)
{
}
header.ascx
<%@ 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>