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

    Now I have my dataset, and I want to use textboxes instead. How do I do
    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. Advertisements

  2. Eagle

    Guest Guest

    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.
    hope this helps.
    Guest, May 5, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.