I've got a table with textbox controls that I'm submitting to a database.
On the .net codebehind, I have a function that loops through all rows and cells and collects the controls. It then passes that arraylist to another class method, which checks if a certain field is already int the database. If not, it adds it to the database, then requeries the database to get the new id created for the entry, and appends that to the id of the controls.
for example, if the control is cntr_firstname, and the text michael doesn't exist, it adds it to the datbase, then requeries the database, and appends the the new entry id, to the id of the textbox control, making it 68_cntr_firstname.
After all of this, it then submits the full record, with the new id.
This is necessary due to related tables.
Anyways, because it's changing the textbox id, if I go and resubmit from the page a second time with a new textbox id, the data is gone because the textbox id has changed on the aspx page. how do I reinitialize the page on reload, to restore the old textbox id?
I'll probably need to clarify this... :S
On the .net codebehind, I have a function that loops through all rows and cells and collects the controls. It then passes that arraylist to another class method, which checks if a certain field is already int the database. If not, it adds it to the database, then requeries the database to get the new id created for the entry, and appends that to the id of the controls.
for example, if the control is cntr_firstname, and the text michael doesn't exist, it adds it to the datbase, then requeries the database, and appends the the new entry id, to the id of the textbox control, making it 68_cntr_firstname.
After all of this, it then submits the full record, with the new id.
This is necessary due to related tables.
Anyways, because it's changing the textbox id, if I go and resubmit from the page a second time with a new textbox id, the data is gone because the textbox id has changed on the aspx page. how do I reinitialize the page on reload, to restore the old textbox id?
I'll probably need to clarify this... :S