随笔分类 - MVC
摘要:return Content("<script>window.alert('请选择要导入的文件!');history.go(-1);</script>", "text/html;charset=utf-8");
阅读全文
摘要:HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"];//获取传统context HttpRequestBase request = context.Request;//定义传统request对象 var t = request...
阅读全文
摘要:WebMVC\Views\Shared\_Layout.cshtml 每个页面_ 自动引用_ViewStart.cshtml
阅读全文
摘要:} catch (DbEntityValidationException ex) { message = "添加异常"; desc = " {" + ex.Message + "}"; logtype = "异常"; }...
阅读全文
摘要:服务器接收 http://www.huangwenchao.com.cn/2015/09/html-file-blob.html https://blog.csdn.net/moonpure/article/details/50462043
阅读全文
摘要:[StringLength(50)] //可空 对应数据库可空 [DefaultValue("")] [DisplayName("添加人用户名")] public string CreateUserName { get; set; } //[...
阅读全文
摘要:解决, 在win7上卸载IIS 10.0 Express ,安装 IIS7.5 Express
阅读全文
摘要:public ActionResult Add(FormCollection fm) //通过FormCollection 对象获取表单数据 { string message = ""; string desc = ""; bool flag = false; var WritDocName = fm["WritDocName"]; var Time = fm["Time"];
阅读全文
摘要:转https://blog.csdn.net/tangolivesky/article/details/46507723?tdsourcetag=s_pcqq_aiomsg
阅读全文
摘要:string filePath = System.Web.HttpContext.Current.Request.MapPath("");//获得控制器名字目录下的 filePath = System.Web.HttpContext.Current.Request.MapPath("../");//
阅读全文
摘要:var ss = Server.MapPath(""); //C:\Users\Administrator\Desktop\Csharp测试程序\TestMVC\TestMVC ss = ss + "/bin/index.html"; using (StreamReader sr = new StreamReader(ss, Syste...
阅读全文
摘要:[System.Runtime.InteropServices.DllImport("kernel32.dll")] static extern uint GetTickCount(); // GET: Home public ActionResult Index() { //System...
阅读全文
摘要:@RenderSection("Styles", required: false) @section Styles{ }
阅读全文
摘要:@{ var str = ""; str = item.ApplyStatus == 0 ? "申请中" : item...
阅读全文
摘要:@ViewData["MenuName"] 和 @ViewBag.MenuName 表示同一个值
阅读全文
摘要:@using System.Text; @{ int js = 1; string str=""; StringBuilder sb = new StringBuilder(); } @foreach (var item in ViewBag.Doctypes) { ...
阅读全文