Multiple Data sources in TemplateColumn

T

tshad

The following gives me an error:

Character is not valid

The TemplateColumn

<asp:TemplateColumn Visible="true" HeaderText="Meets Job Rqrmnts"
ItemStyle-Width="170px" ItemStyle-VerticalAlign="middle">
<itemtemplate>
<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc")%> <%#
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>
</itemtemplate>
</asp:TemplateColumn>

I actually want to do it like so (with a slash and not a blank):

<asp:TemplateColumn Visible="true" HeaderText="Meets Job Rqrmnts"
ItemStyle-Width="170px" ItemStyle-VerticalAlign="middle">
<itemtemplate>
<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc")%>/<%#
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>
</itemtemplate>
</asp:TemplateColumn>

How would I do this?

Thanks

Tom
 
K

Kalpesh

AFAIK, you can concat them without creating a seperate <%#....%>

<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc") + "/" +
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>

I havent tested this. But, it should work

Kalpesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top