J
Jeronimo Bertran
Hi,
I am trying to display a column with a linkbutton with a bitmap which
depends on different criteria.
I currently have the following
<itemtemplate>
<asp:linkbutton runat="server" commandname="Respond"
Text="<img src='images/button1.gif'>" ></asp:linkbutton>
</itemtemplate>
Which works fine for fixed images... I now want to decide on the actual
file depending on a formula applied to a field name. I tried the
following:
Text="<img src='<%# GetProperFile(1)%>'>"
And defined GetProperFile in my code behind as:
public void GetProperFile(int nStatus)
{
Response.Write("images/button1.gif");
}
But it doesn't work.
Also, if I try to use the DataBinder as a parameter:
Text="<img src='<%# GetProperFile((int) DataBinder.Eval(Container.DataItem,
"status"))%>'>">
And try to swith to design view, I get a message Quote Values differently
inside a '<%..."value"...%>' block.
Thanks,
Jeronimo
I am trying to display a column with a linkbutton with a bitmap which
depends on different criteria.
I currently have the following
<itemtemplate>
<asp:linkbutton runat="server" commandname="Respond"
Text="<img src='images/button1.gif'>" ></asp:linkbutton>
</itemtemplate>
Which works fine for fixed images... I now want to decide on the actual
file depending on a formula applied to a field name. I tried the
following:
Text="<img src='<%# GetProperFile(1)%>'>"
And defined GetProperFile in my code behind as:
public void GetProperFile(int nStatus)
{
Response.Write("images/button1.gif");
}
But it doesn't work.
Also, if I try to use the DataBinder as a parameter:
Text="<img src='<%# GetProperFile((int) DataBinder.Eval(Container.DataItem,
"status"))%>'>">
And try to swith to design view, I get a message Quote Values differently
inside a '<%..."value"...%>' block.
Thanks,
Jeronimo