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
Schleid Alex
NA
361
48.2k
Help finding the problem
Apr 25 2020 9:15 PM
Hi,
I am trying to get a list of month and I have try this
Public List<MonthToShow> ddlMonth
{
for(int i= 1; i < 13; i++)
{
List<MonthToShow> monthlist = new List<MonthToShow
{ new MonthToShow { MonthName = monthlist.Add(DateTimeFormatInfo.CurrentInfo.GetMonthName(i),
MonthValue = i}
}
return monthlist;
but it is not working... this is to create a dropdownlist.
Thank you!
PS I have class MonthToShow
{
public string MonthName {get; set;}
public int MonthValue {get; set;}
}
Reply
Answers (
5
)
asp.net server control reference
How to save data to two table aspnetuser table and profile t