06 2011 档案
摘要:04 – MVC ModelData Annotationspublic class RegisterModel{ [Required] [Display(Name = "User name")] public string UserName { get; set; } [Required] [DataType(DataType.EmailAddress)] [Display(Name = "Email address")] public string Email { get; set; } [Required] [StringLength...
阅读全文
posted @ 2011-06-16 04:59
Jian, Li
摘要:03 – Ajax and JavascriptRazor helper (Read this article to get more)Razor helper is similar to function in javascript, it can be defined in View using it or in a separate Razor View fileIn _layout view there are two lines of code to import javascript: <script src="@Url.Content("~/Script
阅读全文
posted @ 2011-06-14 06:02
Jian, Li
摘要:02 - Razor Views in ASP.NET MVC 3Razor expression always returns HTML Encoded text. For example, the controller returns a javascript text to the view, razor expression in the view will only display the plain text of it, rather than running the javascript code:the source code of the page is:But if we
阅读全文
posted @ 2011-06-11 05:59
Jian, Li
摘要:01- Controllers in ASP.NET MVC 3Application_Start() method in Global.asax.cs is the startup entry of the applicationUsing RouteData object to get information of routing dataIn the route collection, the first route that matches the URL will Win, so we should put our particular route before the very g
阅读全文
posted @ 2011-06-11 05:55
Jian, Li
摘要:<1>Basic concepts 0. Dom elemenet => jQuery Wrapper:function (menuTag, itemTag) { var menu = $(menuTag).data("tMenu"); var item = $(itemTag, menu.element); menu.enable(item); var imgUrl = $("#h_imgSaveUrl").val(); $("#btnSaveSetup>span>img").attr("sr
阅读全文
posted @ 2011-06-10 07:06
Jian, Li

浙公网安备 33010602011771号