Getting Data and setting/retrieving values to controls

Discussion in 'ASP .Net' started by Eagle, May 4, 2005.

  1. Eagle

    Eagle Guest

    I'm sure this is simple, thanks for helping this newbie. I've worked with
    the datagrid and it's very simple to get the dataset, and bind it to the
    grid.

    Now I have my dataset, and I want to use textboxes instead. How do I do
    that?
    So I want txtBox1.text = value of the first field in a dataset record.
    Then if the user changes that value, need to save that data back to the
    dataset then save it back to the database.

    Interestingly, everything I see is how to bind to a list or grid, so I
    thought this would be simple.

    Thanks for your help!
     
    Eagle, May 4, 2005
    #1
    1. Advertising

  2. ok this can be achieved by using itemtemplate. Use edititemtemplate and give
    the textbox in that template and in itemtemplate use label. so that when
    first on display you can view label and when the user click on edit button or
    any link they willl see the textbox and have a update button to update the
    changes. you can find further sample and help in the link below.

    http://msdn.microsoft.com/library/d...y/en-us/dnaspp/html/creatingcustomcolumns.asp
    hope this helps.
     
    =?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=, May 5, 2005
    #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. Bryan Donaldson
    Replies:
    0
    Views:
    443
    Bryan Donaldson
    Nov 24, 2003
  2. osh
    Replies:
    1
    Views:
    6,019
  3. Nathan Sokalski

    Retrieving values from dynamically added controls

    Nathan Sokalski, Sep 9, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    1,260
    Scott Roberts
    Nov 20, 2007
  4. Jacob

    retrieving values from dynamically created controls

    Jacob, Oct 11, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    147
    Jacob
    Oct 11, 2003
  5. Nathan Sokalski

    Retrieving values from dynamically added controls

    Nathan Sokalski, Sep 9, 2007, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    971
    Beatrix
    Nov 20, 2007
Loading...

Share This Page