Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted
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.
  • *Experts*
Posted (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 by jfackler
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...