
Signature
Christopher A. Reed
"The oxen are slow, but the earth is patient."
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
> How many values do you want to put into your TextBox? Your SQL select
> statement will probably return back more than one value.
[quoted text clipped - 13 lines]
>>
>> Luqman
Christopher Reed - 24 Jan 2006 12:39 GMT
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.

Signature
Christopher A. Reed
"The oxen are slow, but the earth is patient."
> Hi,
>
[quoted text clipped - 30 lines]
>>>
>>> Luqman
Luqman - 25 Jan 2006 09:36 GMT
Ok thanks for your help, I will definitely try out.
Best Regards,
Luqman
> You might consider using a FormView which is a template-based data
> control. So, within your ASPX page, you could do something like this:
[quoted text clipped - 47 lines]
>>>>
>>>> Luqman