D
Dave
I'm one baffled newbie. I know this is trivial, but I can't figure it out.
Using inline aspx code, I have a function called dbIntegerToString(i as
Integer, s as String) as String
Down in the html code, I have a datagrid, a stub of which follows:
<asp:TemplateColumn>
<ItemTemplate>
<%# Container.DataItem("Lessons") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText = "Recommendation">
<ItemTemplate>
<%# Container.DataItem("Recommendation") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText = "DOT">
<ItemTemplate>
<%= dbIntegerToString(3, "Category") %>
</ItemTemplate>
</asp:TemplateColumn>
All this works fine.
But my issue is in the last ItemTemplate. What I want to do, instead of
passing '3', is to pass a data value I read in when all the other data
values were read (in another vb procedure). The field is called "DOT", and
is in the same SELECT statement as the other fields you see.
Replacing '3' with 'Container.DataItem("DOT")' doesn't work (Compiler Error
Message: BC30451: Name 'Container' is not declared.), and other feeble
attempts also result in errors.
Is there anybody out there that can set me straight on this?
Thanks in advance,
Dave
Using inline aspx code, I have a function called dbIntegerToString(i as
Integer, s as String) as String
Down in the html code, I have a datagrid, a stub of which follows:
<asp:TemplateColumn>
<ItemTemplate>
<%# Container.DataItem("Lessons") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText = "Recommendation">
<ItemTemplate>
<%# Container.DataItem("Recommendation") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText = "DOT">
<ItemTemplate>
<%= dbIntegerToString(3, "Category") %>
</ItemTemplate>
</asp:TemplateColumn>
All this works fine.
But my issue is in the last ItemTemplate. What I want to do, instead of
passing '3', is to pass a data value I read in when all the other data
values were read (in another vb procedure). The field is called "DOT", and
is in the same SELECT statement as the other fields you see.
Replacing '3' with 'Container.DataItem("DOT")' doesn't work (Compiler Error
Message: BC30451: Name 'Container' is not declared.), and other feeble
attempts also result in errors.
Is there anybody out there that can set me straight on this?
Thanks in advance,
Dave