我正在使用数据列表,并希望在其中使用分页,还有1件事.... [英] i m using datalist and want to use paging in it and also 1 thing....

查看:71
本文介绍了我正在使用数据列表,并希望在其中使用分页,还有1件事....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个数据列表,并希望在其中使用分页,还有一件事是它的方向应该是水平的并且在一行中.在运行时应显示四个项目.
我对属性进行了更改,重复列应为四个,水平方向应重复,但这在运行时不起作用.

为什么会这样?

OP发表评论:

I am using a data list and want to use paging in it and also one thing is that its orientation should be horizontal and in one line. There are four items that should be shown at run time.
I have made changes in the properties, repeat column should be four and repeat direction horizontal but this is not working at runtime.

Why so?

Posted by OP in comment:

<asp:DataList ID="dl" runat="server" RepeatDirection="Horizontal" DataKeyField="ID" RepeatColumns="2">
	<HeaderTemplate>
		<table>
	</HeaderTemplate>

	<tr>
	<td>
		<asp:ImageButton ID="ibtn" runat="server" Width="100px" Height="100px" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Recipe_Path")%>' onclick="ibtn_Click" oncommand="ibtn_Command"/>
	</td>
	<td>
		<asp:LinkButton ID="lbtnimage" runat="server" CommandArgument='<%#Bind("ID") %>' Text='<%# Eval("Title_Recipes") %>' onclick="lbtnimage_Click" oncommand="lbtnimage_Command">LinkButton
	</td>
	</tr>

	</table>

推荐答案



在这里,我提供了有关数据列表中分页的详细信息的链接
只要检查一下就可以了

http://www.codeproject.com/KB/aspnet/DataListPaging.aspx

而且您必须每行显示四个项目吗?

检查您的数据库值中有多少行.

以及它们如何在运行时显示.

所有内容都排成一行或一一对应

并发布您的设计代码.

最好的
Hi,

Here I''m providing link for details about paging in datalist
just check it once you''ll get idea on that

http://www.codeproject.com/KB/aspnet/DataListPaging.aspx

And you''ve to show four items per row right?

check your database values howmany rows in it.

and how they displaying in runtime.

All are in single row or just as one by one

And post your design code also.

All the Best


这篇关于我正在使用数据列表,并希望在其中使用分页,还有1件事....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆