以下のようなテキストボックスがあります
@using (Html.BeginForm("checkUserType", "Place", new {type = }))
{
<div id="login">
<div class="userNameLabel">UserName</div>
<div class="userNameField"><input type="text" id="txtUserName"/><span><input type="button" value="ok" id="ok" /></span></div>
</div>
}
テキストボックスの値をコントローラーに渡したいです。そのために、以下のコードを使用しましたが、機能していません...助けてください...
アクション方法
[HttpPost]
public ActionResult checkUserType(string type)
{
var elements = from element in db.USERS
where element.UserType == type
select element;
if (elements == null)
{
return RedirectToAction("Index");
}
else
{
return RedirectToAction("Place/Index");
}
}