Get DataBinding Expression at run time?

Discussion in 'ASP .Net Web Controls' started by ivo, Jul 17, 2003.

  1. ivo

    ivo Guest

    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
     
    ivo, Jul 17, 2003
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Cook
    Replies:
    0
    Views:
    588
    Paul Cook
    Nov 6, 2003
  2. Tzury Bar Yochay
    Replies:
    3
    Views:
    634
    Jacob Yang [MSFT]
    Nov 29, 2003
  3. =?Utf-8?B?cmtibmFpcg==?=

    Design Time vs Run Time DataGrid

    =?Utf-8?B?cmtibmFpcg==?=, Feb 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    700
    Karl Seguin
    Feb 1, 2005
  4. Replies:
    28
    Views:
    12,445
    Fathzer
    Aug 29, 2012
  5. flamesrock
    Replies:
    8
    Views:
    818
    Hendrik van Rooyen
    Nov 24, 2006
  6. jobs
    Replies:
    0
    Views:
    2,445
  7. Pierre Yves
    Replies:
    2
    Views:
    761
    Pierre Yves
    Jan 10, 2008
  8. Earl Teigrob
    Replies:
    1
    Views:
    697
    Shravan
    Mar 1, 2004
Loading...