<input type="text" id="investorinfo" name="investorinfo" />
<button type="submit" class="btn_1 medium">Search</button>
我尝试从输入中获取一个字符串,当用户按下搜索按钮时,我想将它用作搜索参数,您会在下面的代码块中看到。
我尝试使用 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" })