Home > Net >  Repeater batch update traversal problem
Repeater batch update traversal problem

Time:10-10













The background

Protected void Button1_Click (object sender, EventArgs e)
{
List SQLS=new List (a);

Foreach (RepeaterItem dlItem in shipingo. Items)//traverse each row data
{
TextBox tb_qty=dlItem. FindControl (" tb_qty ") as a TextBox;
Label l_id=dlItem. FindControl (" l_id ") as the Label;
SQLS. Add (
"The Update ProposedOrdering Set QTY=@ QTY Where ID=@ ID"
Replace (" @ qty, "tb_qty. Text)
Replace (" @ id, "l_id. Text)
);
}

//SqlDbHelper ExecuteSqlTran (SQLS);

//DataListDataBind ();
}



I in the TextBox tb_qty make things after click the button to get after background values are "" can only get to modify the value of the modified before click the button to get to the front of the value or modify the feeling is how to do with refresh it again?

CodePudding user response:

Know the IsPostBack
  • Related