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
Siyabonga Mthethwa
NA
7
2.5k
An exception error
Jul 27 2015 4:40 AM
i have a above code on my
controller
,
public ActionResult Details(int? id)
{
var dbo = new DrugBusiness();
DrugModel dm = dbo.DetailsMethod(id);
DateTime drug_expdate = dbo.GetAll().Find(x => x.DrugId == id).ExpiryDate;
DateTime now = DateTime.Today;
var days = drug_expdate - now;
if(drug_expdate<=now)
{
ViewBag.msg = "The Drug has
expired
";
}
else
{
ViewBag.msg = "This Drug
expires
in " + days.Days + "Days";
}
return
PartialView(dbo.DetailsMethod(id));
but when im running my Details view it's giving me an error in yellow line, this what it says "{"Object reference not set to an instance of an object."}"
please help me ive try but nothing is
working
, please
Reply
Answers (
1
)
how can i kill any app through c# from remote machine
Databse server UserID Password thorugh any win form app c#