MS DynamicDataのChildren.ascx.csファイルには、Page_Load
「子の表示」というハイパーリンクを返すメソッドがあります。ハイパーリンクテキストの最後に子の数を追加したいと思います。以下は私の試みです。ハイパーリンクに「子の表示-#エントリ」と表示させるにはどうすればよいですか?
protected void Page_Load(object sender, EventArgs e)
{
HyperLink1.Text = "View " + ChildrenColumn.ChildTable.DisplayName;
//The following code gives the total entries.
//How do I get the number of children only?
//int entries = 0;
//foreach (var entry in ChildrenColumn.ChildTable.GetQuery()) { entries++; }
//string entryText = (entries == 1) ? "entry" : "entries";
//HyperLink1.Text= HyperLink1.Text + " " + entries + " " + entryText;
}