?
Solved

asp.net what does eval mean

Posted on 2011-03-21
2
Medium Priority
?
915 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 500 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:Nathan Bove
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

839 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