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
faiza mushtaq
NA
7
2.1k
How Populate Integer values in Dropdown Helper .Net MVC
Aug 6 2016 7:50 AM
I have issue how to populate the integer values like year list in Dropdown helper in MVC without using ViewBag , ViewData.
I try to find out the solution on StackOverflow. But I am facing the error when to load it.
Here my code :
Model:
public IEnumerable<int> StudyYear
{
get
{
var YearsList = new List<int>();
for (int year = 1950; year < 2016; year++)
{
YearsList.Add(year);
}
return YearsList;
}
}
Just need View Dropdown Code how todo it by view.
Reply
Answers (
1
)
How to redirect HTTP404 errors without extension
how mnc company (accenture,tcs) write stored procedure for i