Click to See Complete Forum and Search --> : how to bind a textbox that isnt in a datalist?
PT Exorcist
Jul 30th, 2003, 11:31 PM
how do i bind it? i dont find a .DataSource property like the datalist has!
Borry
Jul 31st, 2003, 08:09 AM
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
PT Exorcist
Jul 31st, 2003, 09:04 AM
hmmm ok
Borry
Jul 31st, 2003, 09:09 AM
You sound disappointed ....
Lazy programmer ? ;)
PT Exorcist
Jul 31st, 2003, 09:10 AM
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..
Borry
Jul 31st, 2003, 09:14 AM
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
hellswraith
Jul 31st, 2003, 12:30 PM
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.
PT Exorcist
Jul 31st, 2003, 02:32 PM
not worth the work..
hellswraith
Jul 31st, 2003, 02:44 PM
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.
PT Exorcist
Jul 31st, 2003, 02:45 PM
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?
PT Exorcist
Jul 31st, 2003, 03:15 PM
ok now i remember that datareader obj has an indexer
tks
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.