Solved

asp.net what does eval mean

Posted on 2011-03-21
2
846 Views
Last Modified: 2012-05-11
I have a grid where I've set one of the columns to use a template and call to a function for its value. What exactly does Eval do?

<ItemTemplate>
                    <asp:Label ID="AuthorizedLabel" runat="server" Text='<%# GetBooleanText(Eval("Authorized")) %>' />
                </ItemTemplate>
0
Comment
Question by:glenn_r
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 125 total points
ID: 35183844
It's short for Evaluate. It basically means "see if you can find a property on the datasource with the specified name, and put its value here".
0
 
LVL 7

Expert Comment

by:nbove
ID: 35183890
Carl is absolutely correct.  It is also important to note that the Eval function will return the value of the property boxed in an object.  If you want to do some sort of logic with the value (such as dynamically determining if a textbox is visible), you will have to cast it to the appropriate type first.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now