| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1470 人关注过本帖
标题:[求助]下拉列表有错误!!
只看楼主 加入收藏
liuer_529
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2008-5-12
收藏
得分:0 
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://)]
[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);
    }
}

找到了在我们公司最早备份的文件中 你看看有错误吗
2008-05-12 16:43
liuer_529
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2008-5-12
收藏
得分:0 
还有就是.cs的文件都在原来的备份中是不是都要复制过来呢
2008-05-12 16:44
hebingbing
Rank: 6Rank: 6
来 自:黄土高坡
等 级:贵宾
威 望:27
帖 子:3417
专家分:371
注 册:2007-10-22
收藏
得分:0 
其他的我不知道该不该复制,但是我给你说的那个文件你要是要解决的话你必须复制过去……
并且路径也要设置正确……
2008-05-12 17:40
快速回复:[求助]下拉列表有错误!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011517 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved