I have an EntityDataSource:
<asp:EntityDataSource ID="EntityDataSourcePersoneel"
runat="server"
ConnectionString="name=HotelTestDatabaseEntities"
DefaultContainerName="HotelTestDatabaseEntities"
EntitySetName="Personeels"
Include="Afdeling">
</asp:EntityDataSource>
I dynamically add these WhereParameters:
EntityDataSourcePersoneel.WhereParameters.Clear();
EntityDataSourcePersoneel.AutoGenerateWhereClause = true;
EntityDataSourcePersoneel.WhereParameters.Add("personeelID", TypeCode.Int32
personeelId.ToString());
How can I check if WhereParameters returns 0 rows (nothing)?
Oh yeah, if my code is wrong, please help and advise me.. Thanks!
Use the
OnSelectedevent which will occur after a query has finished executing:Read more: here