Hi Friends.
I have an project with vs2005 and sqlserver2005.There is a page contain a combobox , a text box and two button.The combox items are my cost list that maybe thems count increase by user.how can I manage it?
more about it:
if person clicks the add button we have to add textboxe's text as an item for combobox.
I did it like below:
cmbList.Items.Add(txtName.Text);
problem is that ofter programs running the added items have to remains for next play.How Can i save my new list for next plays?
And I have to add this item as a database's culomn which I did so:
sql = "ALTER TABLE tblCost cost";
sql += cmbList.Items.count.Tostring() + " float";
this sql command will plays.here is no problem.
so my tables culomns are named as items index's in my combobox and my tables culomns named as cost0, cost1, ... and new coulumns name is "cost"+(new indexe's number) _The items that added currently_.
the problem starts if the user delete one Item.so my combobox item's counts will increase and it makes error in altering the table.
so how can i improve it?