【发布时间】:2015-09-24 01:45:35
【问题描述】:
我有一个下拉控件,有两种类型的值“承包商”和“全职”,根据下拉选择将显示相关控件。
Now when i click on the submit button i have to redirect to different action method (i.e) when 'Contractor' is selected it should redirect to AddContractor() else it should redirect to Full time along with the filled information.
如何使用单个 Html.Beginform() 实现它
【问题讨论】:
-
你不能使用
Html.Beginform()(它的html是在发送到视图之前在服务器上生成的,所以它只能包含初始值)。您需要回发所选选项的值。显示您的代码!
标签: asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 model-view-controller