NullReferenceException on linq extensions to html helper

Last post 03-05-2009 4:56 PM by joepo5. 0 replies.

Sort Posts:

  • NullReferenceException on linq extensions to html helper

    03-05-2009, 4:56 PM
    • Member
      point Member
    • joepo5
    • Member since 03-05-2009, 4:48 PM
    • Posts 1

    Hi All,

    I have read the posts about nullreference exceptions having to do with routing issues but none of these apply to me. I am running on IIS 7.0 but still get this error in some storefront code.

    This line in ProductDisplay.ascx is throwing a NullReferenceException when the controller attempts to render this view.
    I know that the issue is not Model.ProductCode because I can replace with any string literal and same exception.

    <a href="<%= Html.BuildUrlFromExpression<CatalogController>(x => x.Show(Model.ProductCode)) %>" 

    If anyone has any idea about this, I would sincerely appreciate it. I don't know how to go about debugging this.

    Thanks

    -Joe

    IIS 7.0 (Vista)
    ASP.NET MVC RC 2

     

Page 1 of 1 (1 items)