Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
an expression may not contain a dynamic operation in MVC
Sai Prasad Anumolu
Aug 2 2014 7:05 AM
908
Reply
Error in View :
Model Is
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BorbaneApplication.Model
{
public class Country
{
public string CountryCode { get; set; }
public string CountryName { get; set; }
}
}
View is :
@using BorbaneApplication.Model;
@model BorbaneApplication.Model.Country;
@{
ViewBag.Title = "DisplayTable";
}
<h2>DisplayTable</h2>
<div>
<table>
<tr>
<th>Country Code</th>
<th>Country Name</th>
<th>Operations</th>
</tr>
@foreach(var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelitem =>item.CountryCode)
</td>
<td>
@Html.DisplayFor(modelitem=>item.CountryName)
</td>
</tr>
}
</table>
</div>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
how do I we get to know which all the check box's are TICKED
New Website