[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

.NET Databinding a textbox in a webform

Nikerz Inc

2/13/2004 11:14:00 AM

Hi there,

This must be simple but I can't figure it out. All I want to do is bind a
text box to a column in my dataset. I have a dataset that has First name,
Last name, Address ect.......


I want each text box to have the field so I can also update the database as
well. This seems like mission impossible please help!!


1 Answer

Ken Cox [MS MVP]

2/16/2004 1:35:00 PM

0

Hi,

If you know the structure of your dataset and its tables, you can "walk"
down through the tables, rows and columns to get any piece of data that you
want:

TextBox1.Text = ds.Tables(0).Rows(0).Item("Address")


For a more elaborate method, try here:

http://msdn.microsoft.com/library/en-us/dnpag/html/DIforWC-AP02.asp?frame=true#diforwc-ap02_plag_how...

Ken
Microsoft MVP [ASP.NET]
Toronto


"Nikerz Inc" <nikerzinc@hotmail.com> wrote in message
news:eWU4CKi8DHA.2952@TK2MSFTNGP09.phx.gbl...
> Hi there,
>
> This must be simple but I can't figure it out. All I want to do is bind a
> text box to a column in my dataset. I have a dataset that has First name,
> Last name, Address ect.......
>
>
> I want each text box to have the field so I can also update the database
> as
> well. This seems like mission impossible please help!!
>
>