Problem:
Exception Details: System.Data.EntitySqlException: The query syntax is not valid. Near term '<', line 8, column 16.
Code Behind:
protected void Page_Load(object sender, EventArgs e)
{
int Id = 3;
Page.DataBind();
}
project.aspx.cs
<asp:EntityDataSource ID="ProjectEntityDataSource" runat="server" ConnectionString="name=DBEntities" DefaultContainerName="DBEntities" EnableFlattening="False" EntitySetName="projects" Select="it.[Id], it.[ClientId], it.[Name], it.[Description]"
Where="it.ClientId = <%# Id %> " >
</asp:EntityDataSource>
What i have tried: ASP.NET databinding / getting variables from codebehind
I know it's too easy but i'm not able to figure out where the problem really is why i'm not able to bind the code behind data.Thanks!