会员
众包
新闻
博问
闪存
赞助商
Trae
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
张伟大
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2019年2月18日
【MVC】使用FormCollection获取Form表单数据
摘要: public ActionResult Create(FormCollection form) { string name = form["name"]; //姓名 string mobile = form["mobile"]; //手机号 return View(); ...
阅读全文
posted @ 2019-02-18 09:31 张伟大
阅读(2372)
评论(0)
推荐(0)
2019年1月24日
上传文件时form表单需要添加的属性
摘要: enctype="multipart/form-data"
阅读全文
posted @ 2019-01-24 16:31 张伟大
阅读(4503)
评论(0)
推荐(0)
2019年1月17日
【MVC】输出HTML内容,不输出HTML标签
摘要: 第一种方式: 第二种方式 第三种方式
阅读全文
posted @ 2019-01-17 18:24 张伟大
阅读(966)
评论(0)
推荐(0)
【MVC】视图页引用分部视图(WebForm叫做用户控件)
摘要: 方法一、不经过控制器、动作方法,直接返回Html Head是Views/Shared/Head.cshtml分部视图,视图中可以使用@Model方法读取第二个可选参数“我可以给分布视图传数据”的数据 方法二、经过控制器、动作方法,并返回动作方法返回的视图Html 将返回TestPartial控制器的
阅读全文
posted @ 2019-01-17 17:39 张伟大
阅读(274)
评论(0)
推荐(0)
2019年1月9日
C#发送邮件(使用SSL,587端口)
摘要: static readonly string smtpServer = System.Configuration.ConfigurationManager.AppSettings["SmtpServer"]; static readonly string userName = System.Configuration.ConfigurationManager.AppSetting...
阅读全文
posted @ 2019-01-09 18:10 张伟大
阅读(2921)
评论(0)
推荐(1)
C#发送邮件及注意事项
摘要: 注意事项: 端口号是25 密码是授权码,非登录密码
阅读全文
posted @ 2019-01-09 10:28 张伟大
阅读(469)
评论(0)
推荐(0)
2019年1月8日
echarts重绘
摘要: myChart.setOption(option,true); //true重绘
阅读全文
posted @ 2019-01-08 11:08 张伟大
阅读(5167)
评论(0)
推荐(1)
2018年12月13日
清除浏览器缓存meta标签
摘要:
阅读全文
posted @ 2018-12-13 17:09 张伟大
阅读(212)
评论(0)
推荐(0)
2018年11月12日
获取互联网附件的流
摘要: 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 张伟大
阅读(166)
评论(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 张伟大
阅读(911)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告
点击右上角即可分享