2
我需要從這些選項框選擇的值傳遞到「列表」視圖傳遞值
CSHTML文件
@Html.RadioButtonFor(m => m.SmokeHouse, 1)
@Html.RadioButtonFor(m => m.SmokeHouse, 0)
@Html.RadioButtonFor(m => m.SmokeCar, 1)
@Html.RadioButtonFor(m => m.SmokeCar, 0)
@Html.RadioButtonFor(m => m.SmokeWork, 1)
@Html.RadioButtonFor(m => m.SmokeWork, 0)
[HttpPost]
public ViewResult SmokingEnvironments()
{
return View("List");
}
類
public class Screen
{
public int SmokeCar { get; set; }
public int SmokeHouse { get; set; }
public int SmokeWork { get; set; }
}
如果視圖位於另一個名爲Results的文件夾中,該怎麼辦? – user2224493 2013-05-02 19:53:15
@ user2224493這是什麼意思? – asawyer 2013-05-02 19:55:56
return View(「〜/ Views/Results/List.aspx」,model); – user2224493 2013-05-02 19:56:53