Reputation: 634
I need to make an filter operation in the view of my project.
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=ETicaretEntities1" DefaultContainerName="ETicaretEntities1" EnableFlattening="False" EntitySetName="BookTable" EntityTypeFilter="BookTable"
where ="it.[BookSales] > 1.6"></asp:EntityDataSource>
This code works fine but i need to take that 1.6 from codebehind. In summary i need to take a float from codebehind and use it in view side. Thank you for your time !
Upvotes: 0
Views: 39
Reputation: 634
satisOrtalama was the float i wanted to use and this code did the trick:
string satisOrtalamaFormated = satisOrtalama.ToString().Replace(",", ".").Replace(".", ".");
EntityDataSource1.Where = "it.BookSales > " + satisOrtalamaFormated;
Upvotes: 1