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
Bhavna Chaudhri
NA
529
20.9k
Null reference exception on Edit
Nov 26 2020 12:25 PM
I have an Asp.Net application , on Edit click on Gridview a popup is opened , but as some columns may be null i am getting error on assignment.
var teacher= from t in db.Teachers.ToList()
select
new
{
Name=t.UserName,
FirstName=t.FirstName,
LastName=t.LastName,
Email=t.Email,
Lab=t.Lab
}
txtUserName.Text=teacher.Name;
txtFirstName.Text=teacher.FirstName;
txtLastName.Text=teacher.LastName;
// here i am getting error
txtEmail.Text=teacher.Email;
txtLab.Text=teacher.Lab;
Reply
Answers (
1
)
whatsapp integration in asp.net MVC.
How to use IQueryable in WPF