Error after passing variable from jquery to code in c#
- by Moraru Viorel
I try to pass variable from jquery to code c# but something is wrong. I have in js this code:
<script type="text/javascript">
var mySerial = '12345';
var fooUrl = '@Url.Action("Foo", "Home")';
window.location.href = fooUrl + '?mySerial' + encodeURIComponent(mySerial);
</script>
in controller :
[HttpPost]
public…