Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to use - Eval("SomeItem") in a code-behind

Reply
Thread Tools

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

 
 
Paul
Guest
Posts: n/a
 
      03-16-2006
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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not use ''; file already in use. M K ASP .Net 11 04-09-2008 11:35 AM
where to use CPLD & where to use FPGA? kulkarku@math.net VHDL 6 03-06-2006 07:27 AM
How do I know when to use the Viewstate and when to use the posted data? :-) Simon ASP .Net 1 11-09-2004 02:32 AM
Can I use XPath or something to a remote Mac or Linux box and just query an xml file, not using web services and use encyrption? jake ASP .Net 0 07-06-2004 02:16 PM
Cannot use the profile "default" because it is in use, not. please.post@yur.re.ply Firefox 1 07-04-2004 03:41 AM



Advertisments