Introduction: In this application we using AJAX in ASP.NET MVC. AJAX stands for "Asynchronous JavaScript and XML." AJAX is a technique for creating fast and dynamic web pages. Now in this application we developed the Updated status Information using ASP.NET MVC. An XMLHttpRequest object is used to to exchange data asynchronously with a server. JavaScript/DOM to display and interact with the information. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. CSS is used to set style the data and last XML is used as the format for transferring data. Now we know that ASP.NET MVC framework was designed to enable you to write good software applications.
Step1: Open Visual Studio 2010.
- Go to file -> New->Projects
- Create an ASP.NET MVC 2 Web Application
- The name of the application is "Manishapplication"

Step2: First we open site.master page.
- Open Views Folder-> Shared Folder->Site.master page

Code:
<%@
Master Language="C#"
Inherits="System.Web.Mvc.ViewMasterPage"
%>
<script
src="<%=
Url.Content("~/Scripts/MicrosoftAjax.debug.js")
%>"
type="text/javascript"></script>
<script
src="<%=
Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js")
%>"
type="text/javascript"></script>
<!DOCTYPE
html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head
runat="server">
<title><asp:ContentPlaceHolder
ID="TitleContent"
runat="server"
/></title>
<link
href="../../Content/Site.css"
rel="stylesheet"
type="text/css"
/>
</head>
<body>
<div
class="page">
<div
id="header">
<div
id="title">
<h1>Ajax
using by manish</h1>
</div>
<div
id="logindisplay">
<%
Html.RenderPartial("LogOnUserControl");
%>
</div>
<div
id="menucontainer">
<ul
id="menu">
<li><%:
Html.ActionLink("Home",
"Index", "Home")%></li>
<li><%:
Html.ActionLink("About",
"About", "Home")%></li>
</ul>
</div>
</div>
<div
id="main">
<asp:ContentPlaceHolder
ID="MainContent"
runat="server"
/>
<div
id="footer">
</div>
</div>
</div>
</body>
</html>





Join the conversation! Your thoughts help the community grow.