我有一个MVC 3应用程序,其中包含以下视图:
@model IEnumerable<TRP_MVC_Prototype.Models.usp_TM_Select_ShortName_PIDResult>
@{
ViewBag.Title = "Details";
}
<div id="main" style="background-color:White">
<h1 style="background-color:transparent;color:Blue;">You are logged on as: @ViewBag.Message
@Html.DropDownList("shrt_ttl", new SelectList(Model,"short_title","short_title"))
@Html.ActionLink("Select", "Details", new { Shrt_title = "" })
<a style="color:Blue;position:absolute; right:600px" @Html.ActionLink("Create Program Summary", "Index", "User_Guide") </a>
<a style="color:Blue;position:absolute; right:350px" @Html.ActionLink("Edit Program Summary", "Index", "User_Guide") </a>
<a style="color:Blue;position:absolute; right:150px" @Html.ActionLink("Delete TRP", "Index", "User_Guide") </a>
</h1>
<h1 style="background-color:transparent;color:Blue;">Select TRP to View</h1>
<h1 style="color:Gray";>______________________________________________________________________________________________________________________________________________________________________________</h1>
</div>
我需要为DropDownList中的选定值分配Shrt_title字符串的返回值。在我看来,Shrt_title的赋值是需要发生的,但我不能将正确的变量分配给该字符串。它会返回到控制器,但是我认为放入变量的是我的问题。 TIA 布鲁斯