using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Test.Models;
namespace Test.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
var model = new DropDownListData();
model.DropDownListItems.Add(new SelectListItem { Text = "Sun", Value = "1" });
return View(model);
}
}
}
System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>
가 '추가'에 대한 정의 및 유형 System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>
의 첫 번째 인수를 받아들이는없는 확장 메서드 '추가'를 포함하지 않는 볼 수 있습니다 (만약 당신이 사용하여 누락 된 것을 말한다 지시문 또는 어셈블리 참조)
어떤 누락 된 내용이 있습니까?
'model.DropDownListItems' 속성은 어떤 유형입니까? –