<input type="text" id="investorinfo" name="investorinfo" />
<button type="submit" class="btn_1 medium">Search</button>
我正在尝试从
<input>
中获取一个字符串,当用户按下搜索按钮时,我想将该字符串用作下面代码块中的 searchparameter
。
我尝试在 JS 中使用,但我必须将它传递给视图中的 c# 代码块,但我无法使其工作。
@Ajax.ActionLink("Search", "ListCity", "Home", new { searchparameter = "inputfrominvestorinfo" }, new AjaxOptions() { HttpMethod = "GET", InsertionMode = InsertionMode.Replace, UpdateTargetId = "Citys" }, new { @class = "form-control", @style = "color:pink" })