Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A simple question about Databinder.Eval and Container.Dataitem

Status
Not open for further replies.

josemauricio

Programmer
Sep 2, 2003
65
BR
People,

I think it's a simple question that couldn't find out the answer searching in Internet that probably you can help me. I've found some examples that use databinder.eval(container.dataitem, "attributename") and anothers that uses just container.dataitem("attributename"). But I haven't guet the difference between this two of show bind information in HTML code. Could you answer this question?

Thanks a lot!

José Maurício.
 
The Container.DataItem("column-name") gets the data source column directly. The Eval method not only gets the data source column name, but will optionally format data. For example, the
DataBinder.Eval(Container.DataItem, "attributename", {0:C}) will format this column value as currency.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top