随笔分类 -  MVC

摘要:参考http://www.cnblogs.com/ldp615/archive/2010/09/17/asp-net-mvc-file-result.html 1.引入NPOI 2.代码 3.页面请求 阅读全文
posted @ 2016-07-20 09:40 chenjingchun 阅读(4718) 评论(0) 推荐(1)
摘要:[HttpPost] public ActionResult PostTest() { //你的业务代码 //...... //要执行的js string js = "window.location.href='/Home/index2';"; return JavaScript(js); } ps 阅读全文
posted @ 2016-02-25 11:12 chenjingchun 阅读(564) 评论(0) 推荐(0)
摘要:@Html.DropDownListFor(model => model.SchoolId, new SelectList(ViewBag.SelectList, "SchoolTypeId", "Name"), "请选择")//model.SchoolId类型Int ViewBag.SelectList集合 @Html.ValidationMessageFor(mod... 阅读全文
posted @ 2016-01-22 16:44 chenjingchun 阅读(472) 评论(0) 推荐(0)
摘要:$(function() { $("#go").click(function() { var models = []; $.each($("table tr"), function(i, item) { var ProductName = $(item).find("[name=ProductNam 阅读全文
posted @ 2016-01-22 15:36 chenjingchun 阅读(315) 评论(0) 推荐(1)
摘要:URL的获取很简单,ASP.NET通用: 【1】获取 完整url (协议名+域名+虚拟目录名+文件名+参数) 【2】获取 虚拟目录名+页面名+参数: 【3】获取 虚拟目录名+页面名: 【4】获取 域名: 【5】获取 参数: 【6】获取 端口: 二、当前controller、action的获取 阅读全文
posted @ 2016-01-22 15:31 chenjingchun 阅读(341) 评论(0) 推荐(0)
摘要://自定义一个DatePicker.cshtml文件@helper Init(){ //日期字体颜色 }@helper Render(params string[] controlIds){ if (controlIds != null) { }... 阅读全文
posted @ 2016-01-14 12:02 chenjingchun 阅读(656) 评论(0) 推荐(0)
摘要:public class CommonAuthorize : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase httpContext) { ... 阅读全文
posted @ 2016-01-14 11:53 chenjingchun 阅读(675) 评论(0) 推荐(0)