<%# %> used in binding expressions. Just when Control.DataBind is called, the binding expressions will take their actual values. It can be used to set some properties on server controls based on the runtime value of an expression.
<%= expression %> equivalent to <% Response.Write(expression); %> <% Response.Write(expression); %> , which is executed at the visualization stage and directly displays the value of the expression. As a result, it cannot be used to change the behavior of objects on the server side.
source share