in ASP.NET MVC i was trying to bind a model field with displayText with code below:
<% if (Model.WillAttend == true)
Html.DisplayTextFor(x => x.Name); %>
but when i tried:
<% if (Model.WillAttend == true) %>
<% = Html.DisplayTextFor(x => x.Name) %>
it is working, why? both seems same code, the only different is in below one is just each line is separated with the server side tag.