Hi,
I'm developing a DNN module with ASP.Net 3.0 and VS2008. I've to call a web method defined in a .asmx page residing under folder of my module.
But while calling that method from javascript, I'm facing error: "NamespaceName not defined"
Code used:
// In '.ascx.cs' file of my module
if(AJAX.IsInstalled() && AJAX.IsEnabled())
{
System.Web.UI.ScriptManager manager = System.Web.UI.ScriptManager.GetCurrent(this.Page);
System.Web.UI.ServiceReference reference = new System.Web.UI.ServiceReference();
reference.Path = ResolveUrl("Sample.asmx");
manager.Services.Add(reference);
}
From javascript, I'm calling webmethod as:
<script language="javascript" type="text/javascript">
// This function does'nt accept any parameter, and utilize asynchronous call
NamespaceName.ClassName.FuntionName();
</script>
Your help will be highly appreciated!