随笔分类 -  MVC

摘要:return Content("<script>window.alert('请选择要导入的文件!');history.go(-1);</script>", "text/html;charset=utf-8"); 阅读全文
posted @ 2021-06-08 08:59 enych 阅读(35) 评论(0) 推荐(0) 编辑
摘要:HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"];//获取传统context HttpRequestBase request = context.Request;//定义传统request对象 var t = request... 阅读全文
posted @ 2019-11-01 19:24 enych 阅读(282) 评论(0) 推荐(0) 编辑
摘要:WebMVC\Views\Shared\_Layout.cshtml 每个页面_ 自动引用_ViewStart.cshtml 阅读全文
posted @ 2018-12-14 11:44 enych 阅读(209) 评论(0) 推荐(0) 编辑
摘要:} catch (DbEntityValidationException ex) { message = "添加异常"; desc = " {" + ex.Message + "}"; logtype = "异常"; }... 阅读全文
posted @ 2018-12-06 17:07 enych 阅读(166) 评论(0) 推荐(0) 编辑
摘要:服务器接收 http://www.huangwenchao.com.cn/2015/09/html-file-blob.html https://blog.csdn.net/moonpure/article/details/50462043 阅读全文
posted @ 2018-11-26 21:46 enych 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-11-14 16:51 enych 阅读(4992) 评论(0) 推荐(0) 编辑
摘要:[StringLength(50)] //可空 对应数据库可空 [DefaultValue("")] [DisplayName("添加人用户名")] public string CreateUserName { get; set; } //[... 阅读全文
posted @ 2018-11-14 16:47 enych 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-11-14 15:24 enych 阅读(275) 评论(0) 推荐(0) 编辑
摘要:解决, 在win7上卸载IIS 10.0 Express ,安装 IIS7.5 Express 阅读全文
posted @ 2018-10-19 15:58 enych 阅读(291) 评论(0) 推荐(0) 编辑
摘要:public ActionResult Add(FormCollection fm) //通过FormCollection 对象获取表单数据 { string message = ""; string desc = ""; bool flag = false; var WritDocName = fm["WritDocName"]; var Time = fm["Time"]; 阅读全文
posted @ 2018-08-23 09:48 enych 阅读(1408) 评论(0) 推荐(0) 编辑
摘要:转https://blog.csdn.net/tangolivesky/article/details/46507723?tdsourcetag=s_pcqq_aiomsg 阅读全文
posted @ 2018-08-10 12:24 enych 阅读(190) 评论(0) 推荐(0) 编辑
摘要:string filePath = System.Web.HttpContext.Current.Request.MapPath("");//获得控制器名字目录下的 filePath = System.Web.HttpContext.Current.Request.MapPath("../");// 阅读全文
posted @ 2018-08-08 10:34 enych 阅读(1160) 评论(0) 推荐(0) 编辑
摘要:var ss = Server.MapPath(""); //C:\Users\Administrator\Desktop\Csharp测试程序\TestMVC\TestMVC ss = ss + "/bin/index.html"; using (StreamReader sr = new StreamReader(ss, Syste... 阅读全文
posted @ 2018-08-06 17:47 enych 阅读(3301) 评论(0) 推荐(0) 编辑
摘要:[System.Runtime.InteropServices.DllImport("kernel32.dll")] static extern uint GetTickCount(); // GET: Home public ActionResult Index() { //System... 阅读全文
posted @ 2018-08-06 09:03 enych 阅读(416) 评论(0) 推荐(0) 编辑
摘要:@RenderSection("Styles", required: false) @section Styles{ } 阅读全文
posted @ 2018-07-20 15:18 enych 阅读(306) 评论(0) 推荐(0) 编辑
摘要://文件的输入流 阅读全文
posted @ 2018-07-13 14:39 enych 阅读(268) 评论(0) 推荐(0) 编辑
摘要://跳转区域下的控制器 阅读全文
posted @ 2018-07-11 10:45 enych 阅读(297) 评论(0) 推荐(0) 编辑
摘要:@{ var str = ""; str = item.ApplyStatus == 0 ? "申请中" : item... 阅读全文
posted @ 2018-07-10 18:04 enych 阅读(1540) 评论(0) 推荐(0) 编辑
摘要:@ViewData["MenuName"] 和 @ViewBag.MenuName 表示同一个值 阅读全文
posted @ 2018-07-07 14:32 enych 阅读(225) 评论(0) 推荐(0) 编辑
摘要:@using System.Text; @{ int js = 1; string str=""; StringBuilder sb = new StringBuilder(); } @foreach (var item in ViewBag.Doctypes) { ... 阅读全文
posted @ 2018-07-04 09:25 enych 阅读(592) 评论(0) 推荐(0) 编辑

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