Return to Snippet

Revision: 66614
at June 6, 2014 00:34 by DennisvanderStelt

Initial Code
@section Scripts {
	<script type='text/javascript'>
		function onSucces(content) {

@using (Ajax.BeginForm("Subscribe", "Home", new AjaxOptions() { OnSuccess = "onSucces", LoadingElementId = "loader" }))
	@Html.TextBoxFor(s => s.EmailAddress);
	<input type="submit" value="button" />
	<div id="loader" style="display:none">Even wachten!</div>
	<div id="result"></div>

Initial URL

Initial Description
How to submit a form asynchronously and get result in JSON

Initial Title
MVC Ajax Submit Form

Initial Tags
form, ajax

Initial Language