コメントに対する返事がないのであまり深く考えていませんが・・・
部分ビューに表示するのは test, demo で全く内容が違うものではなくて、会社名、お知らせ、日付という定型のもので、そのソースが DB のテーブルにあって、DropDownList で選択すると、DB から選択結果を元にレコード(会社名、お知らせ、日付)を抽出して部分ビューに表示するという話ではないかと想像しています。
であれば、Ajax ヘルパーの Ajax.BeginForm を利用することを検討してはいかがですか?
質問者さんの環境で Ajax ヘルパーが使えるかどうかはわかりませんが。(だから、MVC のバージョン、使用したテンプレートを書くように言ったのですけど)
【2018/10/10 17:14 追記】
上に書いた私の想像はほぼ合っているということですので、それに沿った追加情報としてサンプル等を以下に追記します。
まず、Ajax ヘルパーが動くように設定されているか確認してください。
VS2015 のテンプレート作った MVC5 のプロジェクトで Ajax ヘルパーが動くようにするには、以下の記事の通り必要な NuGet パッケージのインストールと設定が必要です。VS2017 は未確認ですが多分同じと思います。確認してください。
MVC5 で AjaxHelper が働かない
http://surferonwww.info/BlogEngine/post/2018/05/28/ajaxhelpers-do-not-work-on-mvc5-application-created-by-visual-studio-template.aspx
例として Microsoft が無償で提供しているサンプルデータベース AdventureWorksLT から、Visual Studio のウィザードを使って Entity Data Model を作って、その中の Customer テーブルを利用します。
以下にサンプルコードをアップしておきます。以下のサンプルではボタンクリックで ajax 呼び出ししていますが、これを DropDownList の change イベントに変更するところは質問者さんの方で考えてください。
Controller / Action Method
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mvc5App.Controllers
{
public class AjaxController : Controller
{
// 部分ビュー用のアクションメソッド
public ActionResult Details(int id)
{
// AdventureWorksLTEntities は Entity Data Model を生成した時に
// 同時に生成されるコンテキストクラス。
var db = new AdventureWorksLTEntities();
var details = (from c in db.Customer
where c.CustomerID == id
select c).FirstOrDefault();
return PartialView(details);
}
public ActionResult Index2()
{
var db = new AdventureWorksLTEntities();
// Take(10) としたのは単に長さを制限するため
var list = (from c in db.Customer
orderby c.CustomerID ascending
select new
{
id = c.CustomerID,
name = c.Title + " " + c.FirstName + " " + c.LastName
}).Take(10);
ViewData["customers"] = list;
return View();
}
}
}
ビュー Index2.cshtml
@{
ViewBag.Title = "Index2";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Index2</h2>
@using (Ajax.BeginForm(
"Details",
new AjaxOptions { UpdateTargetId = "result" }))
{
@Html.DropDownList(
"id", // これにより Details(int id) の id に自動的にモデルバインディングされる
new SelectList(
(System.Collections.IEnumerable)ViewData["customers"],
"id",
"name",
"1"
)
)
<input type="submit" value="詳細表示" />
}
<div id="result"></div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
部分ビュー Details.schtml
@model Mvc5App.Customer
<div>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.NameStyle)
</dt>
<dd>
@Html.DisplayFor(model => model.NameStyle)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Title)
</dt>
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.FirstName)
</dt>
<dd>
@Html.DisplayFor(model => model.FirstName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.MiddleName)
</dt>
<dd>
@Html.DisplayFor(model => model.MiddleName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LastName)
</dt>
<dd>
@Html.DisplayFor(model => model.LastName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Suffix)
</dt>
<dd>
@Html.DisplayFor(model => model.Suffix)
</dd>
<dt>
@Html.DisplayNameFor(model => model.CompanyName)
</dt>
<dd>
@Html.DisplayFor(model => model.CompanyName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SalesPerson)
</dt>
<dd>
@Html.DisplayFor(model => model.SalesPerson)
</dd>
<dt>
@Html.DisplayNameFor(model => model.EmailAddress)
</dt>
<dd>
@Html.DisplayFor(model => model.EmailAddress)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Phone)
</dt>
<dd>
@Html.DisplayFor(model => model.Phone)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PasswordHash)
</dt>
<dd>
@Html.DisplayFor(model => model.PasswordHash)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PasswordSalt)
</dt>
<dd>
@Html.DisplayFor(model => model.PasswordSalt)
</dd>
<dt>
@Html.DisplayNameFor(model => model.rowguid)
</dt>
<dd>
@Html.DisplayFor(model => model.rowguid)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModifiedDate)
</dt>
<dd>
@Html.DisplayFor(model => model.ModifiedDate)
</dd>
</dl>
</div>
実行結果は以下のようになります。赤枠で囲った部分が部分ビューです。