May I use the selected Value from the RadioButtonList
in the IQueryable
to get selected values from a table?
I have RadioButtonList
with DataValueField="Code"
My code is
public IQueryable<Tbl_name> GetValuesfromTable()
{
return dbo.Tbl_name.Where(q => q.Code = (RadioButtonList.SelectedItem.Value)).OrderBy(c => c.Date_publication);
}
Please can you help me with this query?