Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 3
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 3
This is the forum to discuss the Wrox book Professional ASP.NET MVC 3 by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen; ISBN: 978-1-1180-7658-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 5th, 2013, 12:10 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.NullReferenceException was unhandled by user code

System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
Source=App_Web_gccihxxw
StackTrace:
at ASP._Page_Views_Employee_Index_cshtml.Execute() in c:\Users\roman\Downloads\project download\MvcApplication3\MvcApplication3\MvcApplic ation1\Views\Employee\Index.cshtml:line 47
at System.Web.WebPages.WebPageBase.ExecutePageHierarc hy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy ()
at System.Web.WebPages.WebPageBase.ExecutePageHierarc hy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(Vie wContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(Contro llerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActio nResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__Displa yClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActio nResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
InnerException:

|
|
\/ error
@foreach (var item in Model)
{
<tr>
<td>
@item.FirstName
</td>
<td>
@item.LastName
</td>
<td>
@if (@item.Designation == 1) {<p>Developer</p> }
</td>
<td>
@item.Salary
</td>
<td>
@item.DateOfJoining.Date.ToShortDateString()
</td>
<td>
@item.EmployeeId
</td>

</tr>
}
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing 1-10 NullReferenceException was unhandled by tomche BOOK: Professional ASP.NET 4 : in C# and VB 1 February 14th, 2012 05:29 PM
System.NullReferenceException was unhandled by user code - Chapter 8 dtmmaxx BOOK: Beginning ASP.NET 4 : in C# and VB 10 September 1st, 2011 06:51 PM
nullreferenceexception was unhandled by user code rnavin BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 June 11th, 2011 10:26 AM
ConstraintException was unhandled by user code jcooper0 BOOK: Professional ASP.NET MVC 2 8 February 16th, 2011 09:32 AM
TargetInvocationException was unhandled by user code MattHoff BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 October 13th, 2010 12:38 PM



All times are GMT -4. The time now is 05:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.