In this tutorial you will learn the basics of ASP.NET and how to use jQuery and Ajax. This will allow you to write a simple ASP.NET site that you will then run. The program will be a visual studio application
About this Tutorial
Objectives
Delegates will learn to develop web applications using C# 4.0. After completing this course, delegates will be able to:
- Use Visual Studio 2012 effectively
- Create commercial ASP.NET Web Applications
- Develop user interfaces using Master Pages, Site Navigation and Themes
Audience
This course has been designed primarily for programmers new to the .Net development platform. Delegates experience solely in Windows application development or earlier versions of ASP.Net will also find the content beneficial.
Prerequisites
No previous experience in ASP.NET programming is required. But any experience you do have in programming will help. Also no experience in visual studio is required. But again any experience you do have with programming development environments will be a valuable.
Experience using a contemporary OO language such as C++ or C# would be useful but is not required.
Quick Access
Overview
Estimated Time – 1 Hour and 30 minutes
Not what you are looking? Try the next tutorial – ASP.NET MVC4 Using jQuery Mobile
ASP.NET MVC is a server-side technology.
- Handles HTTP requests at the server.
- Sends HTML responses back to the browser.
- At the current time we have only used static HTML – No client side intelligence.
- So the HTML is only updated when the browser loads a new page.
Ajax = “Asynchronous JavaScript with XML“.
- Supports partial updates to Web page.
- So only part of the page needs to be sent back to the browser.
- Asynchronous post-backs to server.
- So the update happens in the background and client can still interact with the page.
- Ajax is a collection of technologies…
MVC comes with some HTML helpers to support AJAX. HTML helpers methods make it easy write raw HTML. They are covered in the “View Techniques” lab. This all means that :
- AJAX. HTML helpers make it very easy to perform asynchronous partial-page updates.
- And they wrap the functionality of the Microsoft ASP.NET AJAX library, so it works well on most modern browsers.
- For example, Ajax.ActionLink() – Renders a link; asynchronous equivalent of Html.ActionLink().
- Also, Ajax.BeginForm() – Renders an HTML form; Asynchronous equivalent of Html.BeginForm(), On submit, fetches and injects new content into existing HTML page.
To use the Ajax Helpers you need to reference their scripts to your view page-
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")"
type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")"
type="text/javascript"></script>
These script files support “unobtrusive Ajax” which means the site is usable without JavaScript and all code is contained in external .js files.
The role of jQuery:
-
Jquery is a free, open-source JavaScript library.
- Dramatically simplifies the task of writing client-side JavaScript code in your web pages.
- Hides browser-specific nuances, which is a great help!
-
The success story of jQuery.
- First released in 2006.
- Widely adopted by major Web platforms, including Microsoft IE6+, Chrome, Firefox 2+, Safari3+, Opera 9+.
Lab 1: Using Ajax Action links
Lab 2: jQuery Techniques
Lab 3: Using jQuery UI
Well done. You have completed the tutorial in the MVC4 course. The next tutorial is
8. ASP.NET MVC4 Using jQuery Mobile
Copyright © 2016 TalkIT®
If you would like to see more content like this in the future, please fill-in our quick survey.