Part 92 Ajax with asp net mvc











############################# Video Source: www.youtube.com/watch?v=B59skvlroyc

Link for code samples used in the demo • http://csharp-video-tutorials.blogspo... • Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. •    / @aarvikitchen5572   • Link for csharp, asp.net, ado.net, dotnet basics, mvc and sql server video tutorial playlists •    / kudvenkat   • ASP.NET AJAX enables a Web application to retrieve data from the server asynchronously and to update portions of the existing page. So these, partial page updates make web application more responsive and hence improves user experience. • In this video, let's discus using Ajax.ActionLink helper. By the end of this video, we should be able to load either • 1. All students or • 2. Top 3 students or • 3. Bottom 3 students • depending on the link we have clicked. • Here are the steps to achieve this • Step 1: Create and populate table tblStudents • Step 2: Create an ado.net entity datamodel using table tblStudents. Upon creating the entity model, change the name of the entity to Student. Save changes and build the solution, so that the Student entity class gets compiled. • Step 3: Add Shared folder (if it doesn't already exists) in Views folder. Right click on Shared folder and add a partial view, with name = _Student.cshtml. • Step 4: Right click on the Controllers folder and add a controller with the following settings • 1. Controller Name = HomeController • 2. Template = Empty MVC controller • Step 5: Right click on the Views folder and add a folder with name = Home . Right click on the Home folder and add a view with Name = Index . • Points to remember: • a) For AJAX to work, jquery and jquery.unobtrusive-ajax javascript files need to be referenced. Reference to jquery.unobtrusive-ajax.js file should be after jquery.js reference. • b) Ajax.ActionLink() html helper has several overloaded versions. We have used the following version • ActionLink(string linkText, string actionName, AjaxOptions ajaxOptions); • First parameter : is the link text that we see on the user interface • Second parameter : is the name of the action method that needs to be invoked, when the link is cicked. • Third parameter : is the ajaxOptions object.

#############################









Content Report
Youtor.org / Youtor.org Torrents YT video Downloader Β© 2024

created by www.mixer.tube