摘要: public ActionResult Create(FormCollection form) { string name = form["name"]; //姓名 string mobile = form["mobile"]; //手机号 return View(); ... 阅读全文
posted @ 2019-02-18 09:31 张伟大 阅读(2354) 评论(0) 推荐(0) 编辑
摘要: enctype="multipart/form-data" 阅读全文
posted @ 2019-01-24 16:31 张伟大 阅读(4473) 评论(0) 推荐(0) 编辑
摘要: 第一种方式: 第二种方式 第三种方式 阅读全文
posted @ 2019-01-17 18:24 张伟大 阅读(951) 评论(0) 推荐(0) 编辑
摘要: 方法一、不经过控制器、动作方法,直接返回Html Head是Views/Shared/Head.cshtml分部视图,视图中可以使用@Model方法读取第二个可选参数“我可以给分布视图传数据”的数据 方法二、经过控制器、动作方法,并返回动作方法返回的视图Html 将返回TestPartial控制器的 阅读全文
posted @ 2019-01-17 17:39 张伟大 阅读(261) 评论(0) 推荐(0) 编辑
摘要: static readonly string smtpServer = System.Configuration.ConfigurationManager.AppSettings["SmtpServer"]; static readonly string userName = System.Configuration.ConfigurationManager.AppSetting... 阅读全文
posted @ 2019-01-09 18:10 张伟大 阅读(2833) 评论(0) 推荐(1) 编辑
摘要: 注意事项: 端口号是25 密码是授权码,非登录密码 阅读全文
posted @ 2019-01-09 10:28 张伟大 阅读(466) 评论(0) 推荐(0) 编辑
摘要: myChart.setOption(option,true); //true重绘 阅读全文
posted @ 2019-01-08 11:08 张伟大 阅读(5149) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2018-12-13 17:09 张伟大 阅读(207) 评论(0) 推荐(0) 编辑
摘要: WebClient wc = new WebClient(); wc.Credentials = CredentialCache.DefaultCredentials; byte[] btPageData = wc.DownloadData("http://www.baidu.com/img/bd_logo1.png"); string strTargetHtml = Encoding.Defa... 阅读全文
posted @ 2018-11-12 14:04 张伟大 阅读(164) 评论(0) 推荐(0) 编辑
摘要: //【1】附件为本地磁盘路径(附件可以为图片、pdf、word等等)string strFile = Server.MapPath("/images/526763.pdf"); using (FileStream fs = new FileStream(strFile, FileMode.Open)) { byte[] bytes = new byte[(int)fs.Length]; ... 阅读全文
posted @ 2018-11-12 11:40 张伟大 阅读(893) 评论(0) 推荐(0) 编辑