Search code examples
asp.netevalhref

Eval and href attribute?


Can you explain please what is occurring in this asp row?

<a href="AddItem.aspx?c=<%# Eval("CollectionID") %>">[edit item]</a>

Solution

  • This looks like an HTML anchor tag which has embedded in the href attribute an ASP.NET binding expression.

    In this case, the binding expression evaluates a property called CollectionID.

    It is not clear exactly what you don't understand about it, so without further information, this is all I can answer.