How to show data bind record in regular textbox object ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henry Lee

    How to show data bind record in regular textbox object ?

    hi,
    In ASP 2.0 , using datasource object with Gridview databind feature is
    really easy to show records from database. However , I want to do the
    samething but using textbox object because there are lots limit in Gridview
    item template. I am not sure can I do that with datasource object since text
    box has no data bind feature. And I can not find the "recordset" in
    datasource object for me to get the data and put it into textbox.text.
    Any idea will be very appreciated,
    Henry


  • Darren Kopp

    #2
    Re: How to show data bind record in regular textbox object ?

    you need to use binding syntax. ie textbox.Text = '<%# Eval("field")
    %>'. it will automatically iterate over each item in the datasource
    for the grid.

    HTH,
    Darren Kopp


    Comment

    • Darren Kopp

      #3
      Re: How to show data bind record in regular textbox object ?

      er, i meant on your textbox control you set text='<%# Eval("field")
      %>'

      sorry about that.

      -darren

      Comment

      Working...