这是我的想法,但它当然不起作用。
@{
var textBoxData = form.find('input[name="textboxList"]').val();
}
<input type="button" value="Add" title="Add" onclick="location.href='@Url.Action("Create_Add", "Controller", new { textboxList = textBoxData })'" />
我应该如何通过这个?控制器动作名称和参数正确。只是我不知道如何获取在文本框中输入的值...
我无法在表单中保存表单,所以有人建议了这个解决方案。代理代码将是:
<firstForm>
textboxfor Name
dropdownfor DType
If DTypeDDL value is "List" then
<secondForm>
textboxfor nameOfItem
submitSecondForm (using that method i mentioned above)
</secondForm>
End If
submitFirstForm
</firstForm>
我一直在尝试保存 2 个表格,但没有运气。这基本上是我最后的手段。