@model HelloWorldMvcApp.passMe
<meta name="viewport" content="width=device-width" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
$("#theButton").click(function () {
var array = $('#emailField').val().split(",");
$.each(array, function (i) {
var passMe = { EmailList: JSON.stringify(theList) };
url: '@Url.RouteUrl(new{ action="PostMe", controller="Home"})',
// contentType: "application/json; charset=utf-8",
success: function (data) {
console.log('success!!');
$("#theOutput").html(data)
error: function (xhr, ajaxOptions, thrownError) {
@Html.TextBoxFor(model => model.EmailList, new
placeholder = "ex@gmail.com (',' Delimited)",
title = "Make sure your email(s) are formatted appropriately (and comma separated).",
<span>The output data:</span>
<input type="button" id="theButton" value="click" />