Hi,
I have converted SiteMapPathHelperModel.cshtml to SiteMapPathHelperModel.vbhtml. Here is the
C# Code!--removed tag-->
@model MvcSiteMapProvider.Web.Html.Models.SiteMapPathHelperModel
@using System.Web.Mvc.Html
@using System.Linq
@using MvcSiteMapProvider.Web.Html.Models
@foreach (var node in Model) {
@Html.DisplayFor(m => node);
if (node != Model.Last()) {
<text> > </text>
}
}
VB Code!--removed tag-->
@imports System.Web.Mvc.Html
@imports System.Linq
@imports MvcSiteMapProvider.Web.Html.Models
@ModelType SiteMapPathHelperModel
@For Each node In Model
Dim x As SiteMapNodeModel = node
@Html.DisplayFor(Function(n) x)
If node IsNot Model.Last() Then
@<text> > </text>
End If
Next
When I run this I get errorMethod not found: 'Void System.Web.Mvc.WebFormView..ctor(System.String, System.String)'.The error happens on @Html.DisplayFor(Function(n) x)
in C sharp this line is @Html.DisplayFor(m => node);What is the equivalent of this in VB
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).