Trying to add decimal datatype parameter to EntityDataSource. is not working (not filtering results ), not raising error. Code : plu_parametrs += "it.Plu_L_Store=@store_num"; PLUEntityDataSource.WhereParameters.Add("store_num", TypeCode.Int32, StoreDropDown.SelectedValue.ToString()); plu_parametrs += "it.Plu_L_Dept=@dept_id"; PLUEntityDataSource.WhereParameters.Add("dept_id", TypeCode.Int32, DropDownDept.SelectedValue.ToString()); plu_parametrs += "it.Plu_L_plu=@txtsearch"; PLUEntityDataSource.WhereParameters.Add("txtsearch", TypeCode.Decimal, txtsearch.Text); PLUEntityDataSource.Where = plu_parametrs.ToString(); PLUEntityDataSource.DataBind(); ASPX code : <asp:EntityDataSource ID="PLUEntityDataSource" runat="server" ConnectionString="name=GSEntities" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="plulookups" Where="it.Plu_L_Store=@store_num and it.Plu_L_Dept=@dept_id and it.Plu_L_Margin = @Plu_L_Price" DefaultContainerName="GSEntities" > <WhereParameters> <asp:ControlParameter ControlID="StoreDropDown" Name="store_num" PropertyName="SelectedValue" Type="Int32" /> <asp:ControlParameter Name="dept_id" Type="Int32" ControlID="DropDownDept" PropertyName="SelectedValue" /> <asp:ControlParameter Name="Plu_L_Price" DefaultValue="100" DbType ="Decimal" ControlID="txtprice" PropertyName="Text"/> </WhereParameters> </asp:EntityDataSource> GridView1.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)