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
yash patel
1.4k
286
21.4k
object refrence is required for the non static field
Oct 2 2020 5:30 AM
public ActionResult SignUp( UserBO objUserBO )
{
if (ModelState.IsValid)
{
UserBL objUserBL = new UserBL();
if(objUserBO.UserId >= 1)
{
nsrouteEntities.Entry(
objUserBL).State = EntityState.Modified;
}
else
{
CustomBO objCustomBO = objUserBL.AddUser(objUserBO);
return View("Login");
}
}
return View(objUserBO);
}
for the bold part the below error is coming
object reference is required for the non static field,method or property
the form is opening properly but when we submit the form it is
adding
a new record instead of
upadating
the existing record
Reply
Answers (
3
)
System.InvalidOperationException
Two winforms app and data transfer should happen using TCP Channel