Last active
August 29, 2015 14:04
-
-
Save tamizhvendan/c087dba84453acbd23b1 to your computer and use it in GitHub Desktop.
ASP.NET MVC 3 Ajax - Part I
This file contains hidden or 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
| public class HomeController : Controller | |
| { | |
| public ActionResult Index() | |
| { | |
| return View(); | |
| } | |
| } |
This file contains hidden or 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
| public string GreetMe() | |
| { | |
| return "Hello ASP.NET MVC3 Ajax!!"; | |
| } |
This file contains hidden or 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
| <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script> | |
| <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script> |
This file contains hidden or 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
| @Ajax.ActionLink("Greet Me", "GreetMe", | |
| new AjaxOptions() { | |
| UpdateTargetId="divGreetings", | |
| HttpMethod="GET" | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment