I had that problem, I figured you can do this ::
Firstly the problem arises because when you have called
if ((bool) DataBinder.Eval(Container.DataItem, "bBooleanField"))
and it doesn't know what Container is because the line is not databound ...
which is signified by the #.
My fix for it was this
You can call a function inputting the databound value
<%# MySupp((string)DataBinder.Eval(Container.DataItem, "suppname"))%>
then from that function (in code behind) you can return the html you need to
make your page work, mine was
public string MySupp(string strg)
{
if (supp != strg)
{
supp = strg;
str = "<tr><td valign=middle colspan=4><font class=supplier>";
str += strg;
str +=" </font></td></tr>";
return str;
}
else
{
supp = strg;
return "";
}
}
It's sneaky isn't it ... and cool ... and took ages to figure out (by me I might
add ... so use it at your peril)
There may be better ways to do it ... but when you're dealing with
templates in
html based files, I can't think of one.