Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
7
Answers
listing data in mvc
aiswarjya sarengi
7y
215
1
Reply
i create a loop to show a list
<
table
>
<
tr
>
<
th
>
</
th
>
<
th
>
TeleGUID
</
th
>
<
th
>
Screen Name
</
th
>
<
th
>
Mobile Number
</
th
>
</
tr
>
@foreach (var item in Model)
{
<
tr
>
<
td
>
@Html.ActionLink("Edit", "Edit", new {
id
=
item
.TeleGUID }) %
>
|
@Html.ActionLink("Details", "Details", new {
id
=
item
.TeleGUID })%
>
</
td
>
<
td
>
@Html.DisplayFor(
modelItem
=
>
item.TeleGUID)
</
td
>
<
td
>
@Html.DisplayFor(
modelItem
=
>
item.TeleName)
</
td
>
<
td
>
@Html.DisplayFor(
modelItem
=
>
item.TeleMob)
</
td
>
</
tr
>
}
</
table
>
controller code is
[HttpGet]
public
ActionResult UserDetails()
{
UserdbEntities db =
new
UserdbEntities();
var tasks = from t
in
db.UserInfoes
select
new
{
t.GUID,
t.Name,
t.Mob,
};
return
View(tasks.ToList());
but i got an error
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
how to send updated data by user through email to multiple
Ms Bot Framework Dynamic Form FLow