复杂筛选代码:
<%csharp%>
string sql="";
//判断第几届
if(!string.IsNullOrEmpty(Request["meetingno"])){
sql=sql+" and meetingno='"+Request["meetingno"]+"'";
}
//判断品牌
if(!string.IsNullOrEmpty(Request["logo"])){
sql=sql+" and brand='"+Request["logo"]+"'";
}
<%/csharp%>
复杂筛选实现方法屡试不爽
<%set DataTable edfDt= get_article_list("shop", category_id, page, "status=0 "+sql+"", out totalcount, out pagelist, "shop_list", category_id, "__id__")%>
<%set string pagelista=get_page_link(10,page,totalcount,"shop_list.aspx?category_id="+category_id+"&meetingno="+Request["meetingno"]+"&logo="+Request["logo"]+"&page=__id__")%>
(一共四个参数)自由分页10每页10个,page 系统变量,totalcount 由以上edfDt输出的变量
其中url 链接可以自由定义
要注意的是:末尾必须加一个page=__id__
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4