06 2011 档案

摘要:1. 上传大文件 http://www.cnblogs.com/lucslg/archive/2011/06/26/2090885.html 2. 在asp.net mvc中使用Uploadify上传文件 http://www.cnblogs.com/dingji/archive/2010/07/07/1772909.html3. JQuery 上传插件Uploadify 使用详解 http://www.cnblogs.com/dingji/archive/2010/07/07/1772909.html4. Uploadify的官方网站 http://www.uploadify.com/5. 阅读全文
posted @ 2011-06-30 15:24 Ken-Cai 阅读(676) 评论(0) 推荐(0) 编辑
摘要:1. 直接在页面初始化 @Html.DropDownListFor(model => model.Status, new SelectList(new string[] {"正常", "暂停销售"}))2.从数据库中读取 Text Valuehttp://code-inside.de/blog-in/2010/12/25/howto-apply-mvc2-html-dropdownlistfor/5. 与 enum 的联系 http://www.dotblogs.com.tw/jed/archive/2010/09/12/mvc_dropdownl 阅读全文
posted @ 2011-06-30 10:56 Ken-Cai 阅读(3905) 评论(0) 推荐(0) 编辑
摘要:[HttpPost] public ActionResult RemoveFromCart(int id) { // Remove the item from the cart var cart = ShoppingCart.GetCart(this.HttpContext); // Get the name of the album to display confirmation string albumName = storeDB.Carts .Single(item => item.RecordId == id).Album.Title; // Remove from cart i 阅读全文
posted @ 2011-06-25 10:49 Ken-Cai 阅读(360) 评论(0) 推荐(0) 编辑
摘要: Required – Indicates that the property is a required field DisplayName – Defines the text we want used on form fields and validation messages StringLength – Defines a maximum length for a string field Range – Gives a maximum and minimum value for a numeric field Bind – Lists fields to exclude 阅读全文
posted @ 2011-06-25 09:45 Ken-Cai 阅读(165) 评论(0) 推荐(0) 编辑
摘要:public ActionResult Create(){ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name");ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name");return View();}@Html.DropDownList("GenreId", String.Empty) 阅读全文
posted @ 2011-06-25 09:21 Ken-Cai 阅读(1031) 评论(0) 推荐(1) 编辑
摘要:public string Browse(string genre){string message = HttpUtility.HtmlEncode("Store.Browse, Genre = " + genre);return message;} 阅读全文
posted @ 2011-06-23 11:44 Ken-Cai 阅读(204) 评论(0) 推荐(0) 编辑
摘要:@model IEnumerable<MvcMusicStore.Models.Album>@helper Truncate(string input, int length){if (input.Length <= length) { @input} else { @input.Substring(0, length)<text>...</text>}}@{ViewBag.Title = "Index"; }<h2>Index</h2><p> @Html.ActionLink("Cre 阅读全文
posted @ 2011-06-15 15:54 Ken-Cai 阅读(314) 评论(0) 推荐(0) 编辑
摘要:public ActionResult Create(){ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name");ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name");return View();}@Html.DropDownList("GenreId", String.Empty) 阅读全文
posted @ 2011-06-15 15:24 Ken-Cai 阅读(259) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.ComponentModel;using System.ComponentModel.DataAnnotations;namespace TravelBusiness{ [MetadataType(typeof(HTL_HotelMetadata))] public partial class HTL_Hotel { private class HTL_HotelMetadata { #region 基元属性 阅读全文
posted @ 2011-06-01 20:54 Ken-Cai 阅读(264) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示