• λ我爱Aspx >> Asp.Net >> 一个用webservice behavior实现的三级联动下拉列表框
  • 一个用webservice behavior实现的三级联动下拉列表框

  • :aspxer  Դ:internet  :2007-5-28 20:37:27  ؼ:web,webservice
  • s += ","+dr["fenlei"].ToString();

    }

    return s;

    }

    [WebMethod]

    public string leixing(string q)

    {

    string str="select distinct type from jinan where code like @#"+q+"%@#";

    SqlCommand cmd=new SqlCommand(str,con);

    cmd.Connection.Open();

    SqlDataReader dr=cmd.ExecuteReader();

    string s="请选择:";

    while(dr.Read())

    {

    s += ","+dr["type"].ToString();

    }

    return s;

    }

    [WebMethod]

    public string haoduan(string q)

    {

    string str="select distinct substring(code,4,4) as haoduan from jinan where type=@#"+q+"@#";

    SqlCommand cmd=new SqlCommand(str,con);

    cmd.Connection.Open();

    SqlDataReader dr=cmd.ExecuteReader();

    string s="请选择:";

    Ҷƪл˵?
  • һƪCreating a Webservice Part 1 of 2[等级:高级](转载:Aspfree)
    һƪ加强 WEB SERVICE 的安全性