I had some vb-net-late-binding-operations-cannot-be-converted-to-an-expression-tree errors
VB.Net Late binding operations cannot be converted to an expression tree
I changes the page code from
<%@ Page Language="vb" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Store.WebUI.Entities.ShippingDetails>" %>
to
<%@ Page Language="vb" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of Store.WebUI.Entities.ShippingDetails)" %>
that fix the error about late-binding-operations-cannot-be-converted-to-an-expression-tree
But now i get this error.
– Type ‘Store.WebUI.Entities.ShippingDetails’ is not defined. 12 5
– ‘Context’ is not a member of ‘ASP.views_cart_checkout_aspx’. 12 5
– ‘BeginForm’ is not a member of ‘Html’. 12 15
My code is
<%@ Page Language="vb" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of Store.WebUI.Entities.ShippingDetails)" %>
NetButik : Færdiggør Ordre
<h2>Betaling</h2>
Venligst indtast dine personlige data og vi vil sende deres vare hurtigst muligt!
<% Using (Html.BeginForm())%>
<%: Html.ValidationSummary() %>
<h3>Sendes til</h3>
<div>Navn: <%: Html.EditorFor(Function(x) x.Name)%></div>
<h3>Adresse</h3>
<div>Linje 1: <%: Html.EditorFor(Function(x) x.Line1)%></div>
<div>Linje 2: <%: Html.EditorFor(Function(x) x.Line2)%></div>
<div>Linje 3: <%: Html.EditorFor(Function(x) x.Line3)%></div>
<div>Postnr: <%: Html.EditorFor(Function(x) x.Zip)%></div>
<div>By: <%: Html.EditorFor(Function(x) x.City)%></div>
<div>Landsdel: <%: Html.EditorFor(Function(x) x.Country)%></div>
<h3>Tilvalg</h3>
<label>
<%: Html.EditorFor(Function(x) x.GiftWrap)%>
Disse vare skal i Gaveindpakning.
</label>
<p align="center"><input type="submit" value="Færdiggør ordre" /></p>
<% End Using%>
Check that class Store.WebUI.Entities.ShippingDetails exists, reference to System.Web.Mvc.dll exists in your solution. If this doesn’t help, post class
Store.WebUI.Entities.ShippingDetailshere, please.