D
Dennis J
I have a table that has color text (Red, Blue...) as values and want to bind
the background (or fg) properties to the column. If I bind a linkbutton's
Text property it displays the text,
but when bound to Forecolor, I get an error ("Specified cast is not valid").
I want an object's
fore/background colors to bind properly to a table. It seems that it wants
the values cast to "system.color" from text and I don't know how to make
that conversion. Or there it something else?
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
the background (or fg) properties to the column. If I bind a linkbutton's
Text property it displays the text,
but when bound to Forecolor, I get an error ("Specified cast is not valid").
I want an object's
fore/background colors to bind properly to a table. It seems that it wants
the values cast to "system.color" from text and I don't know how to make
that conversion. Or there it something else?
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