学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
轻松建立自己的群组,招兵买马   
 13 12
发新话题
打印

[求助]下拉列表有错误!!

using System;
using System.Web;
using System.Collections.Specialized;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml;

/// <summary>
/// WebService 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {

    public WebService ()
    {
    }

    private static XmlDocument xmlDoc;
    private static XmlDocument industryXmlDoc;
    private static object objectLock = new object();

    public static XmlDocument Document
    {
        get
        {
            lock (objectLock)
            {
                if (xmlDoc == null)
                {
                    xmlDoc = new XmlDocument();
                    xmlDoc.Load(HttpContext.Current.Server.MapPath("~/region.xml"));
                }
            }
            return xmlDoc;
        }
    }
    public static XmlDocument IndustryDocument
    {
        get
        {
            lock (objectLock)
            {
                if (industryXmlDoc == null)
                {
                    industryXmlDoc = new XmlDocument();
                    industryXmlDoc.Load(HttpContext.Current.Server.MapPath("~/industry.xml"));
                }
            }
            return industryXmlDoc;
        }
    }
    public static string[] Hierarchy
    {
        get { return new string[] { "province", "city" }; }
    }
    public static string[] IndustryHierarchy
    {
        get { return new string[] { "industry1", "industry2" }; }
    }
    [WebMethod]
    public AjaxControlToolkit.CascadingDropDownNameValue[] GetDropDownContents(string knownCategoryValues, string category)
    {
        StringDictionary knownCategoryValuesDictionary = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
        return AjaxControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(Document, Hierarchy, knownCategoryValuesDictionary, category);
    }
    [WebMethod]
    public AjaxControlToolkit.CascadingDropDownNameValue[] GetIndustryDropDownContents(string knownCategoryValues, string category)
    {
        StringDictionary knownCategoryValuesDictionary = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
        return AjaxControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(IndustryDocument, IndustryHierarchy, knownCategoryValuesDictionary, category);
    }
}

找到了在我们公司最早备份的文件中 你看看有错误吗

TOP

还有就是.cs的文件都在原来的备份中是不是都要复制过来呢

TOP

其他的我不知道该不该复制,但是我给你说的那个文件你要是要解决的话你必须复制过去……
并且路径也要设置正确……
积霜累寒始成冰,唯独河冰冰中冰。

TOP

 13 12
发新话题