Hi guys, I have a form with button "Select All Emails". Now the problem I have if I click the button it will display all emails in that "ContactEmail" field from the database, if there is no email created it will show "NULL". Now what I want is not to show anything if the field is null (no email created). Below my controller code;
public JsonResult GetAllUser(EmployeeModel objModelMail, string to)
{
List Recyclers = new List();
{
List
using (WasteRecyclersEntities db = new WasteRecyclersEntities())
{
var query = from q in db.Recyclers
select q.ContactEmail;
return new JsonResult { Data = query.ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
{
var query = from q in db.Recyclers
select q.ContactEmail;
return new JsonResult { Data = query.ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
}
Mangesh GPosted Feb 19, 2018, 6:37 AM
Mangesh GPosted Feb 19, 2018, 6:47 AM
AttiePosted Feb 19, 2018, 6:46 AM
AttiePosted Feb 19, 2018, 6:42 AM
Mangesh and Dharmraj
Mangesh GPosted Feb 19, 2018, 6:42 AM
AttiePosted Feb 19, 2018, 6:31 AM
Dharmraj ThakurPosted Feb 19, 2018, 6:03 AM
Mangesh GPosted Feb 19, 2018, 5:16 AM