自己不会写可以网上找一下,同时还能学习一下
网上能找到还在这招
如过你用的是ASP.NET 你需要这个控件 FileUpload 外加 个 Button 配合
例如:
FileUpload mUpLoad = new FileUpload();
mUpLoad.ID = "UPLD001";
mUpLoad.Font.Name = "微软雅黑";
mUpLoad.Font.Size = 14;
....
Button mCommit = new Button();
mCommit.Width = 130;
mCommit.OnClientClick = "this.value = '正在生成...'; return true;";
mCommit.Font.Name = "微软雅黑";
mCommit.Font.Size = 14;
mCommit.Text = "马上生成";
mCommit.Click+= delegate(Object obj , EventArgs e){
if( mUpLoad.HasFile ){
using( System.IO.Stream mStm = mUpLoad.FileContent ){
// ... 接着读 mStm 就 oK拉
}
}
}
你指的是图床吧。。。有很多呀