protected void GetFinalResult(IQueryable<clsProfileData> result)
{
if (ddlHeightFrom.SelectedValue != "0" && ddlHeightTo.SelectedValue != "0")
{
int from = Convert.ToInt32(ddlHeightFrom.SelectedValue);
result = result.Where(p => Convert.ToInt32(p.Height) > from);
}
}
I am using Entity Framework 4.0
and in above method p.Height
is error causing conversion(string to int).
is there any way to handle this ?