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
Ram Pradeep
NA
59
10.7k
Display data in mvc
Nov 4 2015 11:50 PM
I have a mvc application in vs 2010.in that i have a home controller with one method Index().It is going to return a list of countries.That countries list i want to display through view. How to do that in vs 2010.please tell me how to add view for this and what we need to write code for displaying it to end user.
Here is my controller action.
public ActionResult Index()
{
ViewData["countries"]= new List<string>()
{
"INDIA",
"PAKISTHAN",
"AUSTRALIA",
"SOUTH AFRICA"
};
return View();
}
Reply
Answers (
14
)
How to add role to user in default database created by mvc
How to convert Date format at run time in asp.net