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

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -