Alrighty to make this quick:
set a and set b have flags StartDate="<%# hfStart.value%>" EndDate="<%# hfEnd.value%>"
set a in the item template of a grid view column works like a charm
set b in the HTML table doesn't appear to work at all
What gives?
So far I have tried other server tags with the same code inside but I am obviously missing the salient detail. Why does one work and not the other?
UPDATE: Tried
CDate(hfstart.value).ToString
with <%: and <%= tags <%= hfstart.value %>
Unless I misunderstand, <%= will fire at the very END of the asp.net life cycle stopping it from being useful in this context.
As it turns out you DO need to use <%# %>
within asp tags as others like <% %>
and <%= %>
execute at the end of the ASP.NET life cycle and get spit out the buffer to god knows where. When using <%# %>
however, the asp control needs to be DataBound();
at the appropriate time.
This happens automatically for controls modeled in the <item template>
tags in the gridview because everything within the gridview is bound on its gridview.DataBound()
command.