web ui controls and ASP.NET MVC

Posted by ognjenb on Stack Overflow See other posts from Stack Overflow or by ognjenb
Published on 2010-04-23T08:01:03Z Indexed on 2010/04/23 8:03 UTC
Read the original article Hit count: 280

Filed under:
|

Why will not fill View page of this controller method

public ActionResult Person()
    {
        testEntities6 testPersons = new testEntities6();
        IQueryable<person> persons;

        DropDownLst.Items.Clear();
        DropDownLst.Items.Add("proba");

        persons = from i in testPersons.person
                  select i;
        return View(persons);
    }

and include namespaces:

  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using System.Web.Mvc.Ajax;
  using MvcKVteam.Models;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Web.UI.HtmlControls;

In view page I put this code:

  <asp:DropDownList ID="IbekoIngDropDownLst" runat="server">
  </asp:DropDownList>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc