TextBox Binding in 2.0

G

Guest

This is probably an easy question but I really can’t figure the answer.
In 1.1 you can add a DataSet to your page and bind a TextBox to a column in
a table in the DataSet, how can this be done in 2.0?

I’m using VWD Express. I cannot drag a DataSet to the designer surface, so I
declared a protected DataSet in the code behind file. I don’t know what to
write in the Text property of the TextBox. Using Text=’<%#
Bind(“DataSet.Table[0].Columnâ€) %>’ results in nothing. Actually how to do
this even if I’m using an ObjectDataSource, the TextBox doesn’t have neither
a DataSource nor DataSourceID properties. How can I replicate the 1.1 binding
in 2.0?

In 1.1 the Text property is set to <%# DataBinder.Eval(MyDataset,
“Tables[TableName].DefaultView.[0].ColumnNameâ€), how can I make such a
binding in 2.0?

Note: The TextBox is on the page directly not in a GridView, if it is in a
GridView Bind will work because it has a DataItem to bind to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top