我在以前的开发中经常遇到这样的场景:文件上传之后需要显示文件名,但是asp.net自带的fileupload是不能付给上传后的文件名值的. 以前都是做一个label显示的,今天想起来了,写个控件封装一下,直接上代码 控件的代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; using System.Web; using System.Web.UI;…
PictureBox是C#常用图片空间,本文是学习中搜集网络资料的一些整理和记录 1,PictureBox加载图片 using System.Drawing; //方式1,从图片文件载入 //下面的路径是写死的,可以获取程序运行路径,这样更灵活 Image AA = new Bitmap(@"/Program Files/PictureBoxControlTest/tinyemulator_content.jpg"); pictureBox1.Image =AA; //方式2,通过im…