TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shibly Sadik
NA
167
139k
How to display photo in mvc
Jun 4 2015 2:27 PM
I have uploaded photos successfully in "Content/Student/Photo" folder of my project but can't display them in Index view.
here is my short code:
Model
:
public string FirstName { get; set; }
[Display(Name = "Upload Image")]
[NotMapped]
public HttpPostedFileBase Photo { get; set; }
Index View(for display):
@Html.DisplayNameFor(model => model.FirstName)
@Html.DisplayNameFor(model => model.Photo)
@foreach (var item in Model)
{
@Html.DisplayFor(modelItem => item.FirstName)
@Html.DisplayFor(modelItem => item.Photo)
}
what changes should be made in the Index view??
Reply
Answers (
1
)
Formula of Xirr
get hidden field value in mvc controller