protected void selChengji_OnSelectedIndexChanged(object sender, EventArgs e)
{
DropDownList drop = sender as DropDownList; //获取当前选中的DropDownList
Repeater repS = drop.Parent.Parent as Repeater; //drop的上一级的上一级控件就是Repeater控件
int n = ((RepeaterItem)drop.Parent).ItemIndex; //获取当前选中行的索引
//获取其他信息进行操作
HtmlInputText xuefen = (HtmlInputText)(repS.Items[n].FindControl("txtXuefen"));
string id = ((HtmlInputHidden)(repS.Items[n].FindControl("txtId"))).Value;
......
}
{
DropDownList drop = sender as DropDownList; //获取当前选中的DropDownList
Repeater repS = drop.Parent.Parent as Repeater; //drop的上一级的上一级控件就是Repeater控件
int n = ((RepeaterItem)drop.Parent).ItemIndex; //获取当前选中行的索引
//获取其他信息进行操作
HtmlInputText xuefen = (HtmlInputText)(repS.Items[n].FindControl("txtXuefen"));
string id = ((HtmlInputHidden)(repS.Items[n].FindControl("txtId"))).Value;
......
}