I added the entry below to the asp.net file yet it does not appear. I have the source code and tried to rebuild the whole thing and it still does not show up. Can anyone help me?
Do this in MVC
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace EEDropdownDates.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
List<SelectListItem> yrs = new List<SelectListItem>();
for (int i = 1971; i < 2011; i++)
{
var newItem = new SelectListItem { Text = i.ToString(), Value = i.ToString() };
yrs.Add(newItem);
}
using System;
using System.Collections.Generic
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace EEDropdownDates.Controller
{
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
List<SelectListItem> yrs = new List<SelectListItem>();
for (int i = 1971; i < 2011; i++)
{
var newItem = new SelectListItem { Text = i.ToString(), Value = i.ToString() };
yrs.Add(newItem);
}
return View(yrs);
}
}
}
@model IEnumerable<SelectListItem
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
@Html.DropDownList("yrs",M