prosit
asked on
MVC 5 VB.Net Application Trouble
Hi,
I'm editing the vbhtml file to loop through records to match in a small demo app I'm making,
Here's how it seems to work in C#:
I attempted to convert it to vb, but I'm getting errors... I'm sure it's simple but I'm completely new to mvc...
It gives errors on the HTML tags "<th>" and "<th/>" :
"Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement."
Any help greatly appreciated.
Thanks
~j
I'm editing the vbhtml file to loop through records to match in a small demo app I'm making,
Here's how it seems to work in C#:
@foreach (var item in Model.Enrollments)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Course.Title)
</td>
<td>
@Html.DisplayFor(modelItem => item.Grade)
</td>
<td>
@Html.DisplayFor(modelItem => item.Course.Credits)
</td>
</tr>
}
I attempted to convert it to vb, but I'm getting errors... I'm sure it's simple but I'm completely new to mvc...
@For Each item In Model.Times
<tr>
<th>
@item.Activity.ToString
</th>
<th>
@item.StartTime.ToString
</th>
<th>
@item.EndTime.ToString
</th>
</tr>
Next
</table>
It gives errors on the HTML tags "<th>" and "<th/>" :
"Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement."
Any help greatly appreciated.
Thanks
~j
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found my own solution!
Open in new window