How to get list of objects which have id from session state and show it in dropdownlist?
<p>I have 2 tables in database </p>

<pre><code>Subject(subjID, subjName, tchID)
Teacher(tchID, tchName)
</code></pre>

<p>How to get list of subjects which have <code>tchID</code> value from Sesstion state and show it in <code>dropdownlist</code>?
My controller:</p>

<pre><code> public ActionResult GetListSubj()
    {
        db = new DatabaseMng();
        Teacher tch = db.Teachers.Find(Session["tchID"].ToString());
        ViewBag.subjID = new SelectList(db.Subjects, "subjID", "subjName");
        return View();
    }
</code></pre>

<p>In view:</p>

<p>...</p>

<pre><code>@Html.DropDownList("subjID", String.Empty)
</code></pre>

<p>This is my code, it's not complete, because it return all subjects, but I want subjects have <code>tchID</code> from Session state in Login View:</p>

<pre><code>[HttpPost]
    public ActionResult Login(Teacher model, FormCollection f)
    {
        db = new DatabaseMng();
        string id = f["txtID"];
        string pw= f["txtPass"];
        if (ModelState.IsValid)
        {            
                Session["tchID"] = id;
                return RedirectToAction("GetListSubj", "Teacher"); 
        }
        return View();
    }
</code></pre>