none
Method not found: 'System.Collections.Generic.List`1<System.Web.Mvc.SelectListItem> :::::why Im getting this error

    Question

  • using System;
    //using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using CSC.Repository.Register;
    
    namespace CSC.Controllers.Register
    {
        public class RegisterController : Controller
        {
            // GET: Register
            [HttpGet]
            public ActionResult CreateNewContact()
    
            {
                RegisterRepository registerRepository = new RegisterRepository();
                ViewBag.ddlCountry = new SelectList(registerRepository.GetAllDropDown("ddlCountry"), "Value", "Text");
                ViewBag.ddlContactType = new SelectList(registerRepository.GetAllDropDown("ddlContactType"), "Value", "Text");
                ViewBag.ddlTeamAffiliation = new SelectList(registerRepository.GetAllDropDown("ddlTeamAffiliation"), "Value", "Text");
                return View();
            }
            
        }
    }

    Sunday, October 23, 2016 10:55 PM

Answers

  • They'll help you over here in microsoft official ASP.Net forums

    https://forums.asp.net/1146.aspx/1?MVC

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Sunday, October 23, 2016 11:02 PM
    Moderator