后台测试代码:
DataTable dt = new DataTable();
dtColumnsAdd("A"); dtColumnsAdd("B"); dtColumnsAdd("C"); dtColumnsAdd("D"); dtColumnsAdd("E");
dtColumnsAdd("F"); dtColumnsAdd("G"); dtColumnsAdd("H"); dtColumnsAdd("I");
DataRow dr = dtNewRow();
dr[0] = "1";
dr[1] = "2";
dr[2] = "3";
dr[3] = "4";
dr[4] = "5";
dr[5] = "6";
dr[6] = "7";
dr[7] = "8";
dr[8] = "9";
dtRowsAdd(dr);
foreach (Control c in thisControls) //如果控件在容器中,则为容器名Controls
{
if (c is TextBox)
{
cText = dtRows[0][cTabIndex]ToString();
}
}
如果不清楚,可以继续追问,做任务,望采纳,谢谢。绝对是我一个字符一个字符敲出来的
如果你是springmvc+jsp,可以这样:
controller:
@RequestMapping("/login")public String login(> }
loginjsp:
set a=Picture1 '对象赋值用set
其实你可以用控件数组,3个picture为一个控件数组,这样代码就简单,并且不用对象赋值
Dim a As IntegerPrivate Sub Picture1_Click(Index as Integer) '设控件数组名为Picture1
a=Index
End Sub
Private Sub Command1_Click()
Picture1(a)Move 10,10
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)