I have a datalist binded to an object data source which has a method
In the data list Item template, I have put a div with a heading that will not show if there is no language by that personId in the database table.
If there is data them problem is the datalist repeates the heading for each language instead of showing just the heading above and the row of languages below. I have included all my code below if somebody could advise what is wrong. thank you.
Method in DAL
SELECT PersonId, LanguageId,
(SELECT LanguageName FROM Language WHERE (LanguageId = PersonLanguage.LanguageId)) AS LanguageName
WHERE (PersonId = @PersonId)
<asp:DataList ID="DataList3" runat="server" DataKeyField="ModelId"
DataSourceID="ObjectDataSource4" RepeatDirection="Horizontal" >
View Complete Post