我有这样的阵列:结合的二维阵列,以中继器 - 错误
string[,] productData = new string[5,7];
我其绑定到一个中继器和一个呼叫的方法等:
<img src="<%# getPhoto1WithReplace(Container.ItemIndex) %>"
其等定义:
public String getPhoto1WithReplace(Object itemIndex)
{
int intItemIndex = Int32.Parse(itemIndex.ToString());
if (productData[intItemIndex, 3] != null)
return this.ResolveUrl(productData[intItemIndex, 3].ToString());
else return String.Empty;
}
我不明白为什么它的ItemIndex调用getPhoto1WithReplace为5 我的数组有5个指标:0,1,2,3 ,4,所以HOW Container.ItemIndex可以是5 ...?