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


浙公网安备 33010602011771号