Here you can do like, you need to fire javascript function on your drop down selection change and set that text to hidden text box and pass that value to your action method like below
This will be your html code.
<select id="TaxType" name="TaxType" onchange="SetTaxTextValue();">
<option value="op1">Option1</option>
<option value="op2">Option2</option>
<option value="op3">Option3</option>
<option value="op4">Option4</option>
</select>
<input type="text" style="visibility:hidden" id="txtTax" name="txtTax" />
Below is javascript function
function SetTaxTextValue() {
var taxText = $("#TaxType option:selected").text();;
$("#txtTax").val(taxText);
}
and your controller action will be below
[HttpPost]
public ActionResult Index(string TaxType, string txtTax)
{
string finalVal = TaxType + txtTax;
return View();
}
Hope this will help.
onchange
event) & submit them together. Any code sample/solution you've tried then? – Tetsuya Yamamoto Oct 2 '17 at 7:14