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?
can i save the returning value of eval function in a variable and use
Share
Eval("foo")is a shortcut forDataBinder.Eval(Container.DataItem, "foo"). Container.DataItem contains the actual data you’re trying to get at, and theEval()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.DataItemto 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: