Code
using System;
namespace web
{
public class houselist
{
public void Page_Load(Object Sender,EventAges e)
{
if(!IsPostBack)
{
int qyId = WCommon.Querystrzero("qyid");
int xqyId = WCommon.Querystrzero("xqyid");
int pay = WCommon.Querystrzero("pay");
int area = WCommon.Querystrzero("area");
int hyid = WCommon.Querystrzero("hyid");
int type = WCommon.Querystrzero("type");
int zj = WCommon.Querystrzero("zj");
CreateList(qyId,xqyId,pay,area,hyid,type,zj);
}
}
//生成区域列表
public void qylist()
{
DataTable dt = bll.quyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+item["qyid"].ToString()+"&xqyid=0&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成区域列表
public void qylist()
{
DataTable dt = bll.quyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+item["qyid"].ToString()+"&xqyid=0&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成街道列表
public void xqylist(int qylist)
{
DataTable dt = bll.xquyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qylist+"&xqyid="+item["xqyid"].ToString()+"&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成街道列表
public void xqylist()
{
DataTable dt = bll.xquyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid="+item["xqyid"].ToString()+"&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成支付方式
public string paylist()
{
DataTable dt = bll.paylist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay="+item["xqyid"].ToString()+"&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//生成支付方式
public string paylist(int qyId,int xqyId)
{
DataTable dt = bll.paylist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+item["xqyid"].ToString()+"&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//生成面积方式
public string arealist(int qyId,int xqyId,int pay)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+item["xqyid"].ToString()+"&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//行业生成方式
public string hylist()
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay=0&area=0&hyid="+item["xqyid"].ToString()+"&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
public string hylist(int qyId,int xqyId,int pay,int area)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid="+item["xqyid"].ToString()+"&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//类型生成方式
public string typelist()
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay=0&area=0&hyid=0&type="+item["xqyid"].ToString()+"&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
public string typelist(int qyId,int xqyId,int pay,int area,int hy)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid=0&type="+item["xqyid"].ToString()+"&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//中介生成方式
public string zjlist()
{
return "<li><b><font style="red">全部</font></b></li>"
}
public string zjlist(int qyId,int xqyId,int pay,int area,int hy,int type)
{
StringBuilder strBuilder = new StringBuilder();
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid="+hy+"&type="+type+"&zj="+item["qyidname"].ToString()+">
"</a><li>");
return strBuilder.ToString();
}
public string CreateList(int qyId,int xqyId,int pay,int area,int hyid,int type,int zj)
{
if(qyId == 0 && xqyId == 0 && pay == 0 && area == 0 && hyid == 0 && type == 0 && zj == 0)
{
DivQy.InnerHtml = qylist();
DivxQy.InnerHtml = xqylist();
Divpay.InnerHtml = paylist();
Divarea.InnerHtml = arealist();
Divhyid.InnerHtml = hylist();
Divtype.InnerHtml = typelist();
Divzj.InnerHtml = zjlist();
}
else
{
DivQy.InnerHtml = qylist();
DivxQy.InnerHtml = xqylist(qyId);
Divpay.InnerHtml = paylist(qyId,xqyId);
Divarea.InnerHtml = arealist(qyId,xqyId,pay);
Divhyid.InnerHtml = hylist(qyId,xqyId,pay,area);
divtype.InnerHtml = typelist(qyId,xqyId,pay,area,hy);
Divzj.InnerHtml = zjlist(qyId,xqyId,pay,area,hy,type);
}
}
}
}
using System;
namespace web
{
public class houselist
{
public void Page_Load(Object Sender,EventAges e)
{
if(!IsPostBack)
{
int qyId = WCommon.Querystrzero("qyid");
int xqyId = WCommon.Querystrzero("xqyid");
int pay = WCommon.Querystrzero("pay");
int area = WCommon.Querystrzero("area");
int hyid = WCommon.Querystrzero("hyid");
int type = WCommon.Querystrzero("type");
int zj = WCommon.Querystrzero("zj");
CreateList(qyId,xqyId,pay,area,hyid,type,zj);
}
}
//生成区域列表
public void qylist()
{
DataTable dt = bll.quyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+item["qyid"].ToString()+"&xqyid=0&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成区域列表
public void qylist()
{
DataTable dt = bll.quyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+item["qyid"].ToString()+"&xqyid=0&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成街道列表
public void xqylist(int qylist)
{
DataTable dt = bll.xquyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qylist+"&xqyid="+item["xqyid"].ToString()+"&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成街道列表
public void xqylist()
{
DataTable dt = bll.xquyulist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow item in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid="+item["xqyid"].ToString()+"&pay=0&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>");
}
}
//生成支付方式
public string paylist()
{
DataTable dt = bll.paylist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay="+item["xqyid"].ToString()+"&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//生成支付方式
public string paylist(int qyId,int xqyId)
{
DataTable dt = bll.paylist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+item["xqyid"].ToString()+"&area=0&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//生成面积方式
public string arealist(int qyId,int xqyId,int pay)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+item["xqyid"].ToString()+"&hyid=0&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//行业生成方式
public string hylist()
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay=0&area=0&hyid="+item["xqyid"].ToString()+"&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
public string hylist(int qyId,int xqyId,int pay,int area)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid="+item["xqyid"].ToString()+"&type=0&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//类型生成方式
public string typelist()
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid=0&xqyid=0&pay=0&area=0&hyid=0&type="+item["xqyid"].ToString()+"&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
public string typelist(int qyId,int xqyId,int pay,int area,int hy)
{
DataTable dt = bll.arealist();
StringBuilder strBuilder = new StringBuilder();
foreach(DataRow iem in dt.rows)
{
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid=0&type="+item["xqyid"].ToString()+"&zj=0">
"+item["qyidname"].ToString()+"</a><li>")
}
}
//中介生成方式
public string zjlist()
{
return "<li><b><font style="red">全部</font></b></li>"
}
public string zjlist(int qyId,int xqyId,int pay,int area,int hy,int type)
{
StringBuilder strBuilder = new StringBuilder();
strBuilder.Append("<li><b><font style="red">全部</font></b></li>");
strBuilder.Append("<li><a href="houselist?qyid="+qyId+"&xqyid="+xqyId+"&pay="+pay+"&area="+area+"&hyid="+hy+"&type="+type+"&zj="+item["qyidname"].ToString()+">
"</a><li>");
return strBuilder.ToString();
}
public string CreateList(int qyId,int xqyId,int pay,int area,int hyid,int type,int zj)
{
if(qyId == 0 && xqyId == 0 && pay == 0 && area == 0 && hyid == 0 && type == 0 && zj == 0)
{
DivQy.InnerHtml = qylist();
DivxQy.InnerHtml = xqylist();
Divpay.InnerHtml = paylist();
Divarea.InnerHtml = arealist();
Divhyid.InnerHtml = hylist();
Divtype.InnerHtml = typelist();
Divzj.InnerHtml = zjlist();
}
else
{
DivQy.InnerHtml = qylist();
DivxQy.InnerHtml = xqylist(qyId);
Divpay.InnerHtml = paylist(qyId,xqyId);
Divarea.InnerHtml = arealist(qyId,xqyId,pay);
Divhyid.InnerHtml = hylist(qyId,xqyId,pay,area);
divtype.InnerHtml = typelist(qyId,xqyId,pay,area,hy);
Divzj.InnerHtml = zjlist(qyId,xqyId,pay,area,hy,type);
}
}
}
}
想模仿赶集、易居网,做一个过滤器条件查询,选择的条件高亮显示。
url 不知道如何处理?