質問があります。アクションメソッドで設定した以下の値があり、非表示の値がビューで使用できます。フォームをアクション メソッドに投稿すると、隠しフィールドの値が表示されなくなりました。これに関するアイデアはありますか?
@using (Html.BeginForm("Create", "RunLogEntry", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.HiddenFor(model => Model.OutputStoredFileName)
<button name="submit" class="art-button" type="submit" value="Populate" style="width: 100px">
Attach</button>
}
[HttpPost]
public ActionResult Create(RunLogEntry runLogEntry, String ServiceRequest, string Hour, string Minute, string AMPM,string submit, IEnumerable<HttpPostedFileBase> file, String AssayPerformanceIssues1)
{
if(submit == "Populate")
{
//Runlogentry is the model
if ((System.IO.File.Exists(runLogEntry.OutputStoredFileName)))
System.IO.File.Delete(runLogEntry.LoadListStoredFileName);