c# - For Each SQL Insert change the box ID +1 -
in situation generating dynamic text box based on list box click capture data point, once done need each select , insert them individually database. issue follows.
we have
for each item in listbox --call sql connection-- @var = textbox1.text.tostring()
upon next run (next each item) need code increase textbox1
textbox2
.
any general thoughts on how accomplish this?
something
int iterator = 1; foreach (listboxitem item in yourlistbox.items) { textbox tbx = new textbox(); tbx.id = "textbox" + iterator.tostring(); //your sql operation iterator++; }
Comments
Post a Comment