dtcms分页含多个参数,多个参数分页

官网默认的


 <%set DataTable newsList=get_article_list("news", category_id, pagesize, page, "status=0", out totalcount, out pagelist, "news", category_id,"__id__")%>
 <%foreach(DataRow dr in newsList.Rows)%>

……{dr[title]}
 <%/foreach%>

这段语句所掉用的是DTcms.Web.UI>Label>article.cs>get_article_list()

    protected DataTable get_article_list(string channel_name, int category_id, int page_size, int page_index, string strwhere, out int totalcount, out string pagelist, string _key, params object[] _params)
{
……
}

重点是_params参数

传输参数

params object[] value声明的参数,可以传多个值;

也就是说从“news”后面的值都是_params参数的值;(最上面的代码,从后往前看)


所以,我们如果在分页页面想传递多个值的话,可以直接在后面加即可;

例如:

dtcms分页含多个参数,多个参数分页_第1张图片

<%set DataTable newsList=get_article_list("jichu", category_id, pagesize, page, "status=0", out totalcount, out pagelist, "jichu", category_id, category_id_zi,"__id__")%>
<%foreach(DataRow dr in newsList.Rows)%>
……
<%/foreach%>

其中的 category_id_zi 就是我刚加的参数。 



dtcms传递多个参数怎么获取

https://blog.csdn.net/cplvfx/article/details/80998124


dtcms配置多参数

https://blog.csdn.net/cplvfx/article/details/80998516


你可能感兴趣的:(.net,asp,DT,cms)