积极答复者
ScriptManager 调用 webservices 出错,帮帮忙

问题
-
<asp:ScriptManager ID="SmCategory" ScriptMode="release" runat="server" EnablePartialRendering="true">
<Services>
<asp:ServiceReference Path="~/WebServices/CategoyService.asmx"/>
</Services>
</asp:ScriptManager>js脚本调用:
function ShowNodeDir(value)
{
if( $get("<%=Tr1.ClientID %>")!=null)
{
WebSite.WebServices.CategoryService.EnableSubDomian(value,EnableSubDomain);
}
WebSite.WebServices.CategoryService.CategoryDir(value,ShowRule);
}webservice代码:
[System.Web.Script.Services.ScriptService]
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class CategoyService : System.Web.Services.WebService
{[WebMethod]
public string CategoryDir(int nodeId)
{
if (nodeId > 0)
{
NodeInfo cacheNodeById = Nodes.GetCacheNodeById(nodeId);
return (cacheNodeById.ParentDir + VirtualPathUtility.AppendTrailingSlash(cacheNodeById.NodeDir));
}
return string.Empty;
}[WebMethod]
public bool EnableSubDomian(int nodeId)
{
if (nodeId == 0)
{
return false;
}
NodeInfo cacheNodeById = Nodes.GetCacheNodeById(nodeId);
if (cacheNodeById.ParentId == 0)
{
return false;
}
NodeInfo rootNodeByParentPath = Nodes.GetRootNodeByParentPath(cacheNodeById.ParentPath);
if (rootNodeByParentPath.IsNull)
{
rootNodeByParentPath = cacheNodeById;
}
return rootNodeByParentPath.EnableSubDomain;
}}
老是提示 WebSite.WebServices.CategoryService 为空或不是对像 ,要不就是website未定义,
该引用的都引用了, 请大家帮忙分析分析是那的错,实在没办法了
- 已移动 Sheng Jiang 蒋晟Moderator 2010年3月24日 21:45 System.Web (发件人:.NET Framework 一般性问题讨论区)