.NET Databinding a textbox in a webform

Discussion in 'ASP .Net Web Controls' started by Nikerz Inc, Feb 13, 2004.

  1. Nikerz Inc

    Nikerz Inc Guest

    Hi there,

    This must be simple but I can't figure it out. All I want to do is bind a
    text box to a column in my dataset. I have a dataset that has First name,
    Last name, Address ect.......


    I want each text box to have the field so I can also update the database as
    well. This seems like mission impossible please help!!
     
    Nikerz Inc, Feb 13, 2004
    #1
    1. Advertising

  2. Hi,

    If you know the structure of your dataset and its tables, you can "walk"
    down through the tables, rows and columns to get any piece of data that you
    want:

    TextBox1.Text = ds.Tables(0).Rows(0).Item("Address")


    For a more elaborate method, try here:

    http://msdn.microsoft.com/library/e...sp?frame=true#diforwc-ap02_plag_howtodatabind

    Ken
    Microsoft MVP [ASP.NET]
    Toronto


    "Nikerz Inc" <> wrote in message
    news:...
    > Hi there,
    >
    > This must be simple but I can't figure it out. All I want to do is bind a
    > text box to a column in my dataset. I have a dataset that has First name,
    > Last name, Address ect.......
    >
    >
    > I want each text box to have the field so I can also update the database
    > as
    > well. This seems like mission impossible please help!!
    >
    >
     
    Ken Cox [Microsoft MVP], Feb 16, 2004
    #2
    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. Hazzard
    Replies:
    2
    Views:
    569
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  2. Natty Gur
    Replies:
    0
    Views:
    481
    Natty Gur
    Jul 22, 2003
  3. timmso
    Replies:
    1
    Views:
    534
    Alex Papadimoulis
    Dec 12, 2003
  4. Nikerz Inc

    databinding a textbox in a webform

    Nikerz Inc, Feb 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,224
    Nikerz Inc
    Feb 14, 2004
  5. AGSHAR
    Replies:
    1
    Views:
    598
    AGSHAR
    May 31, 2008
Loading...

Share This Page