TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Attie
NA
95
2.3k
How to remove null values on button click?
Feb 19 2018 5:08 AM
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
();
using (WasteRecyclersEntities db = new WasteRecyclersEntities())
{
var query = from q in db.Recyclers
select q.ContactEmail;
return new JsonResult { Data = query.ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
}
Reply
Answers (
8
)
List as a parametre in sharepoint online using visual studio
dll in .net core mvc