How to use - Eval("SomeItem") in a code-behind

P

Paul

I am using Visual Studio.net 2005 (and asp.net 2.0)
Let's say that in a Web Project, I have created a (Dataset?) called
SomeDataset.xsd.
On it I have a TableAdapter called SomeTableTableAdapter and a query called
GetSomeInfoQuery.

In an aspx page I used an ObjectDataSource, and chose as the business object
SomeDataSetTableAdapters.SomeTableTableAdapter, then the method
GetSomeInfoQuery.
On the aspx side of the page I have a have a FormView with various objects
(labels) displayed that use the Eval("SomeItem") syntax to render.

Question: How would I assign a label value programmatically in the
codebehind?
I tried Label.text=Eval("Something1") copying it form the source of the aspx
page, but it did not work.

In asp.net 1.1, there was a whole riggamarole that was necessary, writing
class files etc, then instantiating them in the page.aspx.vb... Is there an
easier way to do it in asp.net 2?

TIA,

Paul
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top