If you are not seeing InjectC it probably means that InjectC is evaluating
to an empty string. I would suggest creating a method in your class
something like this:
protected string GetInjectCANDInjectDate(string injectC, DateTime
injectDate)
{
string str = injectC + injectDate.ToString();
return str;
}
and then in your aspx file put:
Text='<%# (string) GetInjectCANDInjectDate((string)
Eval("InjectC"),(DateTime) Eval("InjectDate")) %>' >
Put a debug statement in your new method GetInjectCANDInjectDate
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:ed**************@TK2MSFTNGP03.phx.gbl...
I want to show two field in a column of Gridview.
I use the code :
But it only show Bind("InjectDate")
How can I show two field at once in a Template?
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("InjectC") + Bind("InjectDate")%>'></asp:Label>
</ItemTemplate>