08 2011 档案

ASP.NET MVC2 in Action 读书笔记 [12-4] MVC Ajax Helpers
摘要: Index.aspx: <script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../../Scripts/Micro...阅读全文

posted @ 2011-08-04 09:43 .Robot 阅读(38) | 评论 (0) 编辑

ASP.NET MVC2 in Action 读书笔记 [12-2] Ajax with MVC
摘要: Index.aspx: <script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script type="text/javascript"> function getMessage() { $.get("/SimpleAjax/GetMessage", function(data) { $("#re...阅读全文

posted @ 2011-08-04 09:31 .Robot 阅读(23) | 评论 (0) 编辑

ASP.NET MVC2 in Action 读书笔记 [12-1] Custom Ajax
摘要: <script type="text/javascript"> function getXmlHttpRequest() { var xhr; //check for IE implementation(s) if (typeof ActiveXObject != 'undefined') { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } c...阅读全文

posted @ 2011-08-04 09:28 .Robot 阅读(27) | 评论 (0) 编辑

ASP.NET MVC2 in Action 读书笔记 [9-2] CustomActionResults
摘要: Export.aspx: <h2>Export</h2> <a href="<%=Url.Action("ExportUsers") %>">Export Users as CSV</a>HomeController.cs: [HandleError] public class HomeController : Controller { public ActionResult Index() { ...阅读全文

posted @ 2011-08-01 15:14 .Robot 阅读(50) | 评论 (0) 编辑

ASP.NET MVC2 in Action 读书笔记 [9-1] ChildAction
摘要: 1). ChildAction HomeController.cs: [HandleError] public class HomeController : Controller { public ActionResult Index() { ViewData["Message"] = "Welcome to ASP.NET MVC!"; return View(); } [ChildActi...阅读全文

posted @ 2011-08-01 13:56 .Robot 阅读(79) | 评论 (0) 编辑

ASP.NET MVC2 in Action 读书笔记 [4]
摘要: Chapter04: ControllerExamples Index.aspx: <h2>Index</h2> <%if (TempData.ContainsKey("message")) {%> <p class="input-validation-success"><%=TempData["message"]%></p> <%} %> <table> <tr> <th> Username <...阅读全文

posted @ 2011-08-01 13:05 .Robot 阅读(56) | 评论 (0) 编辑