0
我有一箇中繼器,它基本上有一個文本框,並且我在中繼器上實現了分頁功能,中繼器一次只顯示25行。我想要做的是,獲取中繼器中每行的每個文本框,但目前我只能獲取中繼器上顯示的文本框(前25行)。我可以在代碼中更改哪些內容以獲取每一行?asp.net中繼器中的控件
我的代碼如下:
foreach (Control control in repeaterSegmentList.Controls)
{
foreach (Control innerControl in control.Controls)
{
if (innerControl.ID != null)
{
if (innerControl.ID == "Priority")
{
((TextBox)innerControl).Text = txtPrio.Text;
}
}
}
}
在此先感謝。
代碼你給我提供一個例子嗎? – johnnie
@johnnie我會的,但我不知道你是如何得到數據的,你如何將它綁定到你的中繼器。你沒有提供這些細節。 – Icarus