执行 ActionLink 时,如何将文本框的值传递给控制器的操作?
我发现以下示例将“静态”字符串(Veggie Sandwiches)传递给操作(绑定到 discName)。我需要类似的东西,但我想将文本框中的值传递给视图。
@Ajax.ActionLink(
"Where are my Sandwiches??????",
"GetSandwiches",
new {
dishName = "Veggie Sandwiches"},
new AjaxOptions
{
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "SandwichStation"
}
)