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);
}
}
找到了在我们公司最早备份的文件中 你看看有错误吗
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);
}
}
找到了在我们公司最早备份的文件中 你看看有错误吗