NetBlog主题
2017-07-23 20:29
8296
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;namespace XML文件创建
{public partial class Form1 : Form{public Form1(){InitializeComponent();}List<Penson> list = new List<Penson&…
2019-09-13 23:38
3293
在.net Core没有打开目录防问。则这个目录下所有的静态文件都防问不了(如 html、CSS、JS、图片等等....都 不能防问 ),这也是为了保护服务端的文件安全,以下是设置代码,Startup类下的 public void Configure(IApplicationBuilder app, IHostingEnvironment env)的方法
publ…
2020-04-06 11:52
3403
读取
$("#btnSendPhoneList").click(function () {var reader = new FileReader();//新建一个FileReaderreader.readAsText($('#inputfile')[0].f…
2021-03-30 11:59
2499
!doctype htmlhtml lang="zh-cn"headmeta charset="UTF-8"title上传文件/titlestyle.lqwvje-btn {display: inline-block;height: 38px;line-height: 38px;padding: 0 18px;background-color: #009688;color: #fff;white-space: nowrap;text-align: center;fon…
2022-04-11 07:14
8358
2022-05-26 更新2022-04-27 更新 修复读取CVS文件时 索引超出了数组界限public class CSVHelper{//转载请保留 http://www.luofenming.com//// summary/// 写入CSV/// /summary/// param name="fileName"文件名/param/// param name="dt"要写入的datatable/param…
2022-09-02 15:07
2824
以下是核心代码[HttpPost]public async Taskstring Image(IFormFile file){ ResultModel result = new ResultModel(); if (!new[] { "image/jpeg", "image/png" }.Contains(file.ContentType)) { result.code = 2; result.msg = "图片仅支持j…
2022-09-23 20:45
3404
我们先看一下效果,效果如下图视频讲解地址 https://www.bilibili.com/video/BV1H24y1o7UB实现功能步骤如下1、在nuget里面添加第三方库CefSharp.WinForms2、调用显示到winofrm的核心代码如下private void button1_Click(object sender, EventArgs e){//转载请保留 http://www…
2022-09-14 17:02
1172
先看一下效果,在这里我以TextBox控件为例,其它类型的操作也类似于这样视频讲解地址 https://www.bilibili.com/video/BV1AV4y1M7mR步骤如下(控件名为textBox1)1、注册两个事件,代码如下private void textBox1_DragDrop(object sender, DragEventArgs e){ textBox1.Text…
2017-06-12 22:47
3147
using System;
using System.Collections.Generic;
using System.Text;namespace 获取文件名
{class Program{static void Main(string[] args){string s = @"c:\ss\b.txt";string ss= s.Substring(s.LastIndexOf("\\") + 1);Console.WriteLine(ss);//输入…
2017-09-04 10:40
2969
高版本数据库文件还原到低版本数据时,无法还原(或附加)下面是解决方法,如下图把这生成的脚本放到低本的MssqlServer里面运行就可以了