随笔分类 -  Asp.Net MVC3 & 4

From MVC3 Books.
摘要:Helper method Description Ajax.ActionLink Creates a hyperlink to a controller action that fires an Ajax request when clicked ... 阅读全文
posted @ 2012-09-07 18:35 HelloWorld.Michael 阅读(435) 评论(0) 推荐(0)
摘要:Server-side validation Server-side validation should be done whether we validate on the client or not. Users could disable JavaScript or do something unexpected to bypass client-side validation, and ... 阅读全文
posted @ 2012-08-20 17:22 HelloWorld.Michael 阅读(486) 评论(0) 推荐(0)
摘要:HTML helper Description DisplayFor Returns HTML markup for each property in the object that’s represented by the expression ... 阅读全文
posted @ 2012-08-15 13:57 HelloWorld.Michael 阅读(212) 评论(0) 推荐(0)
摘要:There are three different ways in which data can be passed to a view by using the ViewDataDictionary, the ViewBag, and strongly typed views. ViewDataDictionary public ViewResult Show(int id) ... 阅读全文
posted @ 2012-08-15 11:18 HelloWorld.Michael 阅读(213) 评论(0) 推荐(0)
摘要:By Default:public ActionResult Create(){ return View();}Calling the View method returns a ViewResult object that knows how to render a particular view. When this method is called with no arguments,... 阅读全文
posted @ 2012-08-15 11:03 HelloWorld.Michael 阅读(157) 评论(0) 推荐(0)
摘要:URLs In ViewsAction Links:(Extension Method For HtmlHelper)@Html.ActionLink("About this application", "About") ——Returns an anchor element (a element) that contains the virtual path of the specified action.The parameters to the ActionLink method are the text for the link and the 阅读全文
posted @ 2012-02-03 17:07 HelloWorld.Michael 阅读(258) 评论(0) 推荐(0)
摘要:The routing system has two functions:Examine an incoming URL and figure out for which controller and action the request is intendedGenerate outgoing URLs. These are the URLs that appear in the HTML rendered from our views so that a specific action will be invoked when the user clicks the linkRoutes 阅读全文
posted @ 2012-02-03 11:10 HelloWorld.Michael 阅读(325) 评论(0) 推荐(0)