Last active
September 8, 2016 03:35
-
-
Save dacanizares/68386876a49e13ff22ffb573767babe9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@section scripts | |
{ | |
<script> | |
// Esta función se ejecuta al cargar la página | |
$(function () { | |
// Obtiene mediante ajax la partial view | |
// que tiene el listado de juegos | |
$.ajax({ | |
url: "@Url.Content("~/Home/MostrarTodos")" | |
}).done(function (data) { | |
// Al div con id todos le pone como | |
// contenido la partial view recibida (data) | |
$('#todos').html(data); | |
}).fail(function () { | |
alert("error"); | |
}); | |
}); | |
</script> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment