Get DataBinding Expression at run time?

I

ivo

Hello
I have several web-textboxes which are bind to a dataset.
When the user wants to save the changes to the database, i do the following
boring stuff...(pseudocode)

....
DataSet.Field(1) = Textbox1.Text;
DataSet.Field(2) = Textbox2.Text;
....

i would like to do it in a generic way...something like this

foreach(control c in page.controls)
{ DataSet.Field( GetDataBindField() ) = c.Text }

Has somebody an idea, how to implement this "GetDataBindField" function?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,075
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top