我有一些页面用html编写,所有的控件都在html中,就像文本框一样,我不能将这些控件更改为@ html.text。 但我必须从controller中获取数据并做一些逻辑数据。有人告诉我如何获取数据? 这是我查看HTML代码写在HTML如何从html控件中获取数据以查看控制器?
<div class="clearfix"></div>
<label class="label">Customer Name</label>
<select class="browser-default" name="Customername">
<option value="Customer Name1">Customer Name1</option>
<option>Customer Name2</option>
<option>Customer Name3</option>
</select>
<div class="pull-left"><a href="#" class="newCustomer">New Customer</a></div>
<div class="clearfix"></div>
<label class="label">Job Referene</label>
<select class="browser-default" name="jobreference">
<option>Job Referene</option>
</select>
<div class="clearfix"></div>
<label class="label">Quantity</label>
<input type="text" name="quantity" />
<div class="clearfix"></div>
<label class="label">Browser Select</label>
<select class="browser-default">
<option value="" disabled selected>Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
我想在我的控制器来获取数据。
另请参阅:https://stack247.wordpress.com/2011/03/20/get-forms-post-values-in-asp-net-mvc-with-formcollection/ – Leon