You might consider using a FormView which is a template-based data control.
So, within your ASPX page, you could do something like this:
<asp:FormView id="FormView1" runat="server"
DataSourceID="AccessDataSource1">
<ItemTemplate>
<asp:TextBox id="TextBox1" runat="server" Text='<%#
Eval("CompanyCode") %>' />
<asp:TextBox id="TextBox2" runat="server" Text='<%#
Eval("CompanyName") %>' />
</ItemTemplate>
</asp:FormView>
<asp:AccessDataSource id="AccessDataSource" runat="server"
ConnectionString = "Data source=D:\mydb.mdb"
SelectCommand = "Select CompanyCode, CompanyName from customers" />
Depending your actual set up, you may have to tweak the above a little.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Luqman" <pe*******@cyber.net.pk> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I want to display each field in a separate textbox, so if I have 2 fields,
say, companycode and companyname, I want to display both of them in two
textboxes.
For eg.
Textbox1.text= companycode
Textbox2.text=companyname
But I don't know the syntax, Any idea please ?
Best Regards,
Luqman
"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:uy*************@TK2MSFTNGP11.phx.gbl... How many values do you want to put into your TextBox? Your SQL select
statement will probably return back more than one value.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Luqman" <pe*******@cyber.net.pk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... How can I display any field value in textbox of sqldatasource using
VS.Net
2005 ?
Say : Dim x as new AccessDataSource
X.connectionstring="Data source="D:\mydb.mdb"
X.Selectcommand="Select CompanyName from customers"
Textbox1.text= ??? <-------- I need to display CompanyName Field in
this
textbox, how can I ?
Best Regards,
Luqman