Results 1 to 11 of 11

Thread: how to bind a textbox that isnt in a datalist?

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    how to bind a textbox that isnt in a datalist?

    how do i bind it? i dont find a .DataSource property like the datalist has!
    \m/\m/

  2. #2
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99
    You don't actually need to bind it, cause it has almost no sense, cause off the static manner of webdesign.

    So you can just do this txtbox.text = ds.tables(0).cells(0)(0)

    HTH

    Bjorn

  3. #3

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmmm ok
    \m/\m/

  4. #4
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99
    You sound disappointed ....

    Lazy programmer ?

  5. #5

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    if i am using across all the project heavy use of databinding i'd like to databind the text box even if its for a reason of consistency..anyways if i have to do it thru code np..
    \m/\m/

  6. #6
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99
    Indeed,


    I know what I mean... In vb.net projects, this isn't a problem.
    The biggest advantage of asp.net is that you don't need to distribute applications anymore. But it still has much disadvantages !

    But I'm really glad with the server controls, this opens a whole new world.... let's hope that the next generation of asp.net will be even more improved !

    Bjorn

  7. #7
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Or you can create your own textbox control that is inherited from the textbox control. Then just add the databinding code to it so you can then use your new control when you need to.

  8. #8

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    not worth the work..
    \m/\m/

  9. #9
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    That was what I was thinking, but it is an option.

    If you want to databind a lot, then it may be worth it because you could reuse it everytime.

  10. #10

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    err i dont remember how i used to use the datareader..i have a datareader that has some info..how to get the rows from it?
    \m/\m/

  11. #11

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    ok now i remember that datareader obj has an indexer

    tks
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width