Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 977965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:59:16+00:00 2026-05-16T03:59:16+00:00

can i save the returning value of eval function in a variable and use

  • 0

can i save the returning value of eval function in a variable and use it wherever i want?
i can call it just in <asp: .... tags. i can’t use them in vb methods. is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:59:17+00:00Added an answer on May 16, 2026 at 3:59 am

    Eval("foo") is a shortcut for DataBinder.Eval(Container.DataItem, "foo"). Container.DataItem contains the actual data you’re trying to get at, and the Eval() method simply uses reflection or other means to allow late binding on names.

    If you want better compile-time type checking, you can always cast the Container.DataItem to whatever type you want.

    You can also re-use DataBinder.Eval() elsewhere, as a shortcut for using Reflection.

    Some examples of what you can do are below:

    <%# DoSomethingWithData (DataBinder.Eval(Container.DataItem, "Foo")) %>
    
    Sub DoSomethingWithData (Object data)
       SomeProperty = data
       DoSomethingWithData = data
    End Sub
    
    <%# DoSomethingWithDataStronglyTyped (Container.DataItem) %>
    
    Sub DoSomethingWithDataStronglyTyped (Object data)
       Dim StronglyTyped as SomeType
       StronglyTyped = DirectCast (data, SomeType)
       DoSomethingWithDataStronglyTyped = DoSomethingElse(StronglyTyped)
    End Sub
    
    Sub ExampleOfDataBinderEvalReuse ()
    
       Dim StronglyTyped as SomeType
       StronglyTyped = GetSomeData()
    
       ' get "Foo" property of the SomeType class
       DataBinder.Eval(StronglyTyped, "Foo")
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 508k
  • Answers 508k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Rows isn't strongly typed - so there will be a… May 16, 2026 at 4:28 pm
  • Editorial Team
    Editorial Team added an answer You mean, create additional, non-standard button on the keyboard? Try… May 16, 2026 at 4:28 pm
  • Editorial Team
    Editorial Team added an answer Well, you need each node to have something which effectively… May 16, 2026 at 4:28 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I want to save the MessageID of a sent email, so I can later
I can reset FPU's CTRL registers with this: http://support.microsoft.com/kb/326219 But how can I save
I have a page which displays a form that a logged-in user can use
I am exploring a pattern where you can save a global reference to the
I'm trying to convert my LinearLayout to a bitmap so that I can save
Ok I've looked everywhere for this. I'm cutting out a couple of the variable
We're implementing a new solution in our classic ASP environment that's using COM interop
I've got an administrative page with a listbox filled with values. A user can
How can I transfer the values of my graphics to a bitmap so I
I was trying to answer another SO question when I hit upon some very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.