• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 930
  • Last Modified:

asp.net what does eval mean

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?

                    <asp:Label ID="AuthorizedLabel" runat="server" Text='<%# GetBooleanText(Eval("Authorized")) %>' />
1 Solution
Carl TawnSystems and Integration DeveloperCommented:
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".
Nathan BoveSoftware EngineerCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now