TextBox txt = (TextBox)this.DataList1.Items[?].FindControl("txtAQualificati
string ArtID = Request.QueryString["ArtID"].ToString();string jobTitle = this.txtName.Text;
string times = this.txtTime.Text;
string address = this.txtaddress.Text;
if (ArtBus.updateA(jobTitle, times, address, ArtID) != null)
{
for (int i = DataList1.Items.Count; i > this.DataList1.Items.Count; i--)
{
TextBox txt = (TextBox)this.DataList1.Items[DataList1.Items.Count].FindControl("txtAQualifications");
string AQualifications = txt.Text;
Label lb = (Label)this.DataList1.Items[DataList1.Items.Count].FindControl("lbID");
string AQualificationsID = lb.Text;
if(ArtBus.UpdateAQ(AQualificationsID,AQualifications) != null)
{
for (int j = DataList2.Items.Count; j > this.DataList2.Items.Count;j--)
{
TextBox txt1 = (TextBox)this.DataList2.Items[DataList2.Items.Count].FindControl("txtAJobDuties");
string AJobDuties = txt1.Text;
Label lb1 = (Label)this.DataList2.Items[DataList2.Items.Count].FindControl("lbID1");
string AJobDutiesID = lb1.Text;
if (ArtBus.UpdateAJ(AJobDuties, AJobDutiesID) != null)
{
Response.Write("<script>alter('修改成功!');</script>");
}
}
}
}
}
怎样获得datalist中的第几行?运行总是出错 望高手帮忙看下 谢谢!