上一页 1 ··· 14 15 16 17 18
摘要: 新建一个Model 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel.DataAnnotations; 4 using System.Linq; 5 using System.Web; ... 阅读全文
posted @ 2015-11-15 16:43 琴似蓝调 阅读(283) 评论(0) 推荐(0) 编辑
摘要: “=”号,将原封不动输出字符串到页面“:”号:将字符串进行编码后输出到页面1 public ActionResult HtmlEncodeDemo()2 {3 ViewData["strScript"] = "";4 return V... 阅读全文
posted @ 2015-11-14 20:53 琴似蓝调 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 下拉列表框1 前台代码2 3 后台代码4 ViewData["City"] = new List()5 {6 new SelectListItem(){Selected=false,Text="北京",Value="1"},7 ... 阅读全文
posted @ 2015-11-14 20:08 琴似蓝调 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 将ado.net的cs文件SqlHelper.cs放入解决方案 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Conf... 阅读全文
posted @ 2015-11-14 15:51 琴似蓝调 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 如果确认你返回的是一个视图(view),你可以直接返回类型为ViewResult。如果你并不是很清楚,或者你根本不想去理解这些东西,你可以直接返回ActionResult 阅读全文
posted @ 2015-11-11 14:48 琴似蓝调 阅读(647) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18