How to create loop for changing Lable[ID] in asp.net using c#? -
i want create loop changing lable[id].
label1.text = multiarray[rowcount - 1, 1]; label2.text = multiarray[rowcount - 1, 2]; label3.text = multiarray[rowcount - 1, 3];
please give me code solve problem.
for(int index = 1; index <= 3; index ++) { label label = (label)this.controls.find("label" + index, false)[0]; label.text = multiarray[rowcount - 1, index]; }
Comments
Post a Comment