I have a FormView that has a datasource bind as a object which is a WCF service. In the WCF Service i have a Object PublicationDetail which has a attribute List<string> authors;
I want to join the contents of the list and print them out in the form view however i fall on the following error:
And the code:
How can i format this List<string> to a string. If i say
Should note im using Visual Studio 2012
I want to join the contents of the list and print them out in the form view however i fall on the following error:
Unable to cast object of type 'System.String[]' to type 'System.Collections.Generic.List`1[System.String]'.
And the code:
<asp:Label ID="AuthorsLabel" runat="server" Text='<%# String.Join( ",", ((List<string>)Eval("Authors")).ToArray()) %>' />
How can i format this List<string> to a string. If i say
<%# Bind("Authors") or Eval("Authors") %>
, i get the following output: System.String[] everything else gives an compile error.Should note im using Visual Studio 2012