Solved

asp.net what does eval mean

Posted on 2011-03-21
2
860 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

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