1.repeater嵌套repeater的源码问题!急!源码ddns源码在线等
2.å
³äº.netä¸çrepeater
repeater嵌套repeater的源码野牛狂奔附图指标源码问题!急!源码跟涨指标源码公式在线等
给你写是源码正1的源码补码不可能了
告诉一下你思路
先取出父类的列表DataTable
绑定到Repeater
然后在Repeater里面添加模板列
在模板列里写Repeater
然后循环父类列表DataTable去绑定模板列里的Repeater
å ³äº.netä¸çrepeater
repeater使ç¨çæ¹æ³è·datalistå·®ä¸å¤çï¼
ç®å示èä¸ä¸ªï¼
<asp:Repeater id="Repeater_Test" runat="server">
<HeaderTemplate>UserID UserName UserPWD</HeaderTemplate>
<ItemTemplate>
<br /><%#DataBinder.Eval(Container.DataItem,"userID") %>
<%#DataBinder.Eval(Container.DataItem,"username") %>
<%#DataBinder.Eval(Container.DataItem,"password") %>
</ItemTemplate>
</asp:Repeater>
---------------以ä¸æ¯Default.aspxæºç å¤--------
private DataTable DataTableToRepeater()
{
//èªå·±çæä¸ä¸ªDataTableç»Repeapterå½ä½æ°æ®æº
DataTable dt = new DataTable();
dt.Columns.Add("userID");
dt.Columns.Add("username");
dt.Columns.Add("password");
for (int i = 1; i < ; i++)
{
DataRow dr = dt.NewRow();
dr[0] = i;
dr[1] = "User" + i.ToString();
dr[2] = "PWD" + i.ToString();
dt.Rows.Add(dr);
}
return dt;
}
--------------为äºæ¹ä¾¿è°ç¨ï¼ç¹æåäºä¸ä¸ªDataTable---------
çªä½å è½½æ¶
if (!IsPostBack)
{
Repeater_Test.DataSource = DataTableToRepeater();
Repeater_Test.DataBind();
}
-----------------çªä½å è½½------------------
UserID UserName UserPWD
1 User1 PWD1
2 User2 PWD2
3 User3 PWD3
4 User4 PWD4
5 User5 PWD5
6 User6 PWD6
7 User7 PWD7
8 User8 PWD8
9 User9 PWD9
-----------ç»æåºè¯¥æ¯è¿æ ·ç-----------