eramgarden Posted May 31, 2004 Posted May 31, 2004 I have dynamically created 50 textboxes, populated them with data from database. Now, when one field is changed, i want to update the database. What's the best way of determining what field was changed? my idea is to hold the Orig values from the database in session variables...then when user clicks "update", I compare ALL the old values (in the session variables) to ALL the current textbox values.. I think this is doable but tedious Any ideas? Quote
egdotnet Posted May 31, 2004 Posted May 31, 2004 i use a procedure where i compare the go through all the textboxes and compare the unique id while counting each time so when they are the same & it stops, that integer is the index. it's a little tedious also tho. Quote
*Experts* jfackler Posted June 1, 2004 *Experts* Posted June 1, 2004 (edited) Use a dataset and simple bind your data to the textboxes. Updates will persists any changes back to the database source. Check Wrox Press: Beginning ASP.NET Databases using VB.NET walks you through it step by step. Jon Edited June 1, 2004 by jfackler Quote
praveensg Posted June 1, 2004 Posted June 1, 2004 why dont you save all the values within the textboxes back to the database? Anyways u gotto have O(n) to traverse all the textboxes. Im not sure if I've understood your problem correctly. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.