Hi Luppy,
The TextBox control cannot directly bind to SQLDataSource. For me, I will use FormView control with one TextBox control as template to achieve this goal. The client user interface is same as a single TextBox control.
For example, I have provided the following code for your reference. Hope it is helpful to you.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>"
SelectCommand="SELECT [Name] FROM [table1]" OnSelected="SqlDataSource1_Selected"></asp:SqlDataSource>
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("Name") %>'></asp:TextBox>
</ItemTemplate>
</asp:FormView>
</div>
</form>
</body>
</html>
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.