随笔分类 -  MVC

摘要:1. 引用 using Webdiyer.WebControls.Mvc; 2. using Webdiyer.WebControls.Mvc; public ActionResult Index(int id=1) { return View(Models.demodata.getlist.Ord 阅读全文
posted @ 2016-01-27 15:52 甜菜波波 阅读(278) 评论(0) 推荐(0) 编辑
摘要:本例使用的数据库是Northwind1.新建tt文本模板customer.tt2. 修改customer.tt内容为//------------------------------------------------------------------------------// // 此代... 阅读全文
posted @ 2016-01-26 10:02 甜菜波波 阅读(447) 评论(0) 推荐(0) 编辑
摘要:1.引入以下js和css 2. html代码如下 3.后台代码如下: public ActionResult News() { var list = db.Artists.Select(m => new { value=m.Name}).ToLi... 阅读全文
posted @ 2015-09-28 11:26 甜菜波波 阅读(168) 评论(0) 推荐(0) 编辑
摘要:1.引用如下js和css 代码 2.验证代码 3. html代码@using(Html.BeginForm("form")){ @Html.TextBoxFor(m => m.titlenew); @Html.ValidationMes... 阅读全文
posted @ 2015-09-28 10:50 甜菜波波 阅读(451) 评论(0) 推荐(0) 编辑
摘要:测试实体类 public class Test { public int id{get;set;} [Required(ErrorMessage="不能为空喔")] [StringLength(10,ErrorMessage="字符串不能超过10")]... 阅读全文
posted @ 2015-09-28 10:44 甜菜波波 阅读(170) 评论(0) 推荐(0) 编辑
摘要:1.在global.asax void Application_Start(object sender, EventArgs e) { // 在应用程序启动时运行的代码 // RouteConfig.RegisterRoutes(RouteT... 阅读全文
posted @ 2015-09-17 11:43 甜菜波波 阅读(277) 评论(0) 推荐(0) 编辑
摘要:1.新建一个类 (以下实现了打印日志功能)using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace MvcReporistory.Co... 阅读全文
posted @ 2015-08-17 19:00 甜菜波波 阅读(1641) 评论(0) 推荐(0) 编辑

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