AjaxItemSelect.Controllers.TracksController.Index C# (CSharp) Метод

Index() публичный Метод

public Index ( ) : System.Web.Mvc.ActionResult
Результат System.Web.Mvc.ActionResult
        public ActionResult Index()
        {
            // Fetch the collection
            var c = m.ArtistGetAll();

            // Create a form
            var form = new ArtistForm();
            form.ArtistList = new SelectList(c, dataValueField: "ArtistId", dataTextField: "Name");

            return View(form);

            // Attention - 05 - Notice several things in the list-of-artists view...
            // The dropdown list has an "onchange" attribute that calls a JavaScript method
            // The view includes two <div> elements that will be filled in later
            // The "Send" (submit) button is disabled

            // Attention - 06 - Study the artistSelected() method in the JavaScript core.js source code file
        }