All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
病毒及流氓软件自我复制的简单实现
Sql,server一些常见性能问题的总结_[SQL,Server教程]
ASP.NET,2.0服务器控件之实现验证控件_[Asp.Net教程]
C#教程:键盘消息的响应实例
asp.net(C#)海量数据表高效率分页算法(不使用存储过程)_[Asp.Net教程]
斜体样式的导航条_JavaScript技术_编程技术
HTML-加速、再加速_[Html教程]
HTML 初学者指南(7)_[Html教程]
精通数据库系列之入门-技巧篇4_mssql学习_编程技术
Asp.net页面输出成HTML页面_[Asp.Net教程]
Reading number is top 10 pictures
Thrilling English baby
传几朵花
赵惟依写真2
Gang rape
In 2013 hercules Arnold classic2
Plump, too plump!2
西游日记2
Female model behind the bitterness, often being overcharged1
Soldier saw beauty after the reaction
再发两张抽象画
Download software ranking
Tram sex maniac 2 (H) rar bag4
Rio big adventure
Ashlynn Video3
Unix video tutorial3
Tram sex maniac 2 (H) rar bag17
超级战舰
Unix video tutorial2
Ashlynn Video1
Sora aoi, the maid, students' uniforms
传奇私服架设教程-chm
aaa published in(发表于) 2013/12/8 7:49:01 Edit(编辑)
ASP.NET技巧:repeater实现多列显示_.net资料_编程技术

ASP.NET技巧:repeater实现多列显示_.net资料_编程技术

ASP.NET技巧:repeater实现多列显示_.net资料_编程技术-你的首页-uuhomepage.com

一、下面的代码实现,每行显示三列


前台代码:







<%#DataBinder.Eval(Container.DataItem,"thing")%>







后台代码:
protected int i=1;

private void Page_Load(object sender, System.EventArgs e)
{


XmlSerializer ser = new XmlSerializer(typeof(DataSet));
DataSet ds = new DataSet("myDataSet");
DataTable t = new DataTable("table1");
DataColumn c = new DataColumn("thing");
t.Columns.Add(c);
ds.Tables.Add(t);
DataRow r;
for(int i = 0; i<10;i++)
{
r = t.NewRow();
r[0] = i;
t.Rows.Add(r);
}
this.Repeater1 .DataSource =ds.Tables [0].DefaultView ;
this.Repeater1.DataBind ();
}


private void Repeater1_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
if(i%3==0&&i>0)
{
  e.Item.Controls.Add(new LiteralControl("
"));
}
i++;
}






添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.