I have a View that works but I can not figure out how to get the selected value from the DropDownList:
@model IEnumerable<TRP_MVC_Prototype.Models.usp_TM_Select_ShortNameResult>
@using System.Web;
@using System.Web.WebPages;
@using System.Web.Mvc;
@{
ViewBag.Title = "Details";
}
@using (Html.BeginForm("Details", "ProgramSummary", FormMethod.Post, new { id = "Details" }))
{
<div id="main" style="background-color:White">
<h1 style="background-color:transparent;color:Blue;">
<a>You are logged on as: @ViewBag.Message </a>
<span class="DrpDwnLst">DrpDwnLst</span>
@Html.DropDownList("Short_Title", new SelectList(Model, "short_title", "short_title"), "--Select One--").
@Html.ActionLink("Select","Details",new { Shrt_title = ""})
<a style="color:Blue;position:absolute; right:500px"> @Html.ActionLink("Create Program Summary", "Index", "User_Guide") </a>
<a style="color:Blue;position:absolute; right:250px"> @Html.ActionLink("Edit Program Summary", "Index", "User_Guide")</a>
<a style="color:Blue;position:absolute; right:50px"> @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>
}
The DropDownList displays correctly but I don't know how to return the Selected value in the ActionLink. In the action link the third parameter passes the value back to the controller it currently has "" but I would like to figure out how to reference the selected value instead.