我认为我有 Ajax 表单:
@using (Ajax.BeginForm("SearchHuman", "Search", new AjaxOptions(){
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "result" }))
{
<div class="editor-field">
@DescriptionStrings.Lastname:
@Html.TextBox("LastName")
</div>
<div class="editor-field">
@DescriptionStrings.Firstname:
@Html.TextBox("Name")
</div>
//submit button
<input type="submit" value='Start Searching' />
//submit link
@Ajax.ActionLink("search", "OtherSearch", new{lastName ="",...}, new AjaxOptions()
{
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "tab"
})
}
我希望仅使用一种表单来提交按钮和 2 个不同搜索(在不同数据库中)的链接。但是如何将表单文本框中的路由值传递给 Ajax.ActionLink?
提前致谢!