D
Dennis
I have a table that has color text (Red, Blue...) as values and want to bind
items to it. If I bind a linkbutton's Text property it displays the text,
but when bound to Forecolor, I get the attached error. I want an object's
fore/background colors to bind properly to a table.
Thank,
DJ
Server Error in '/AWM' Application.
----------------------------------------------------------------------------
----
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 42: </asp:Label></TD>
Line 43: <TD>
Line 44: <asp:LinkButton id=lb1 runat="server" Width="10px"
Text='<%# DataBinder.Eval(Container, "DataItem.BGColor") %>'
CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ContractID") %>'
ForeColor='<%# DataBinder.Eval(Container, "DataItem.BGColor") %>'>
Line 45: </asp:LinkButton></TD>
Line 46: <TD>
Source File: c:\inetpub\wwwroot\AWM\Contracts\ScheduleYr.aspx Line: 44
items to it. If I bind a linkbutton's Text property it displays the text,
but when bound to Forecolor, I get the attached error. I want an object's
fore/background colors to bind properly to a table.
Thank,
DJ
Server Error in '/AWM' Application.
----------------------------------------------------------------------------
----
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 42: </asp:Label></TD>
Line 43: <TD>
Line 44: <asp:LinkButton id=lb1 runat="server" Width="10px"
Text='<%# DataBinder.Eval(Container, "DataItem.BGColor") %>'
CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ContractID") %>'
ForeColor='<%# DataBinder.Eval(Container, "DataItem.BGColor") %>'>
Line 45: </asp:LinkButton></TD>
Line 46: <TD>
Source File: c:\inetpub\wwwroot\AWM\Contracts\ScheduleYr.aspx Line: 44