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. Advertising

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. Replies:
    28
    Views:
    11,976
    Fathzer
    Aug 29, 2012
  2. flamesrock
    Replies:
    8
    Views:
    451
    Hendrik van Rooyen
    Nov 24, 2006
  3. jobs
    Replies:
    0
    Views:
    1,618
  4. Pierre Yves
    Replies:
    2
    Views:
    482
    Pierre Yves
    Jan 10, 2008
  5. Earl Teigrob
    Replies:
    1
    Views:
    401
    Shravan
    Mar 1, 2004
Loading...

Share This Page