List of Objects to be used on ascx view with Inherits data already loaded MVC...
- by user54197
I have an object list being loded from a database to a drop down list.  The Model loads the data to the Controller.  The aspx view includes an ascx view.  The ascx view already inherits data from another Project.  I cannot set my List object in the ascx page.  Can this be done?
Model
        ...
        string List = dr["example"].ToString().Trim();
        int indicator = dr["ex"].ToString().Trim();
        LossCauseList.Add(new LossCauses(indicator, List));
        ...
Controller
        LossCauses test = new LossCauses();
        test.GetLossCauses(LossType);
        TempData["Select"] = test.LossCauseList;
        return View(myData);
Partial View
        ...
        <select id="SelectedProperty">
           <% List<string> selectProperty = new List<string>();
           selectProperty = TempData["Select"] as List<string>;
           foreach(var item in selectProperty) { %>
                <option><%=item.ToString() %></option>
           <% } %>
         </select>
         ...
Partial view's List should be an actual LossCauses object.  HELP!!!