I´m trying to make a simple filter for my table. I have an aspx page that has a label text. I want to use that text to condition my query. Normally I would just use label.text as the value, but since im working in another layer it won´t work.
How could I make my program understand that it has to use the text from the label of my asp page?
Here´s my code.
public static List<DTO.vEmpleado> GetEmpleadoList()
{
if (//label is empty)
{
return DataAccess.Generic.GetAll<DTO.vEmpleado>(); //this works just fine
}
else
{
return Common.DataContext.vEmpleado.Where(x => x.Nombre == //label.text).ToList(); //this works fine if I replace label.text with something like "Richard"
}
}
GetEmpleadoList()Method to take a string name input.. I think we need to see how you are getting and or passing the label.TextPage_Loadin a web Application..