如何将文本框的值设置为参数?
例如如果用户在文本框中插入“ sss”,则网址应如下所示:
http://localhost/myForm1/myAction1?ProcessStatus=3&Condition1=sss&Condition2
HTML代码:
<div class="container text-center">
<div class="input-group">
<input id="SearchCondition1" type="text" class="form-control" name="SearchCondition1" >
</div>
<div class="input-group">
<input id="SearchCondition2" type="text" class="form-control" name="SearchCondition2" >
</div>
<br />
<div class="row">
<div class="col-sm-2">
<a href="@Url.Action("myAction1", "myForm1")" >Research Form1</a>
<a href="@Url.Action("myAction2", "myForm2",new { ProcessStatus=3, Condition1= "sss" })" >Research Form2</a>
</div>
</div>
</div>
答案 0 :(得分:0)
这是通过使用onclick来完成的。
HTML: