图片上传问题,这个问题比较有意思,求高手们指导! 判断上传的类型不就可以了http://dotnet.aspx.cc/ShowDetail.aspx?id=2A5DD7C6-A45A-48AB-A2E8-342A29F17506上传倒数据库 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://community.csdn.net/Expert/topic/3737/3737622.xml?temp=.5879938是往Access里写的例子! 1SQL Server存储图像数据的策略与方法http://www.yesky.com/20030113/1648152_1.shtml 偶提供一个上传到目录的:string savePath = Server.MapPath("../commonalitypic/"); string filenames = System.IO.Path.GetFileName(File1.PostedFile.FileName); string filePath = @"E:\code\cardinfo\commonalitypic\"+filenames; string thumbPath1 = userpath + filenames; System.Drawing.Image coverImg = System.Drawing.Image.FromFile(filePath); string imgheight = coverImg.Height.ToString(); string imgwidth = coverImg.Width.ToString(); if ( System.Convert.ToInt32(imgwidth)>System.Convert.ToInt32(imgheight)) { System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(134,90, null, IntPtr.Zero); thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg); thumbImg.Dispose(); } else { System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(103,113, null, IntPtr.Zero); thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg); thumbImg.Dispose(); } coverImg.Dispose(); 这个csdn里面很多搜索一下N多 关于16进制数相加的问题 怎样打开pda软键盘? GridView 显示问题 用javascript如何获取datagrid中某行某列的值? 想学一门程序语言,哪个比较好并且容易入门 进度条问题,顶者有分 如何将自己用c编写的dll文件 打包后安装到目标机器? 如何判断一个目录为另一个目录的子目录? 详解此段代码.分全给你们.(c# SqlServer) C#中如何实现对象数据库存储? 怎么编程设置richtextbox的光标位置? C#开发DirectX D3D 窗体一最下化就出异常,望DirectX高手帮助!!! 郁闷中...
是往Access里写的例子!
string savePath = Server.MapPath("../commonalitypic/");
string filenames = System.IO.Path.GetFileName(File1.PostedFile.FileName);
string filePath = @"E:\code\cardinfo\commonalitypic\"+filenames;
string thumbPath1 = userpath + filenames;
System.Drawing.Image coverImg = System.Drawing.Image.FromFile(filePath);
string imgheight = coverImg.Height.ToString();
string imgwidth = coverImg.Width.ToString();
if ( System.Convert.ToInt32(imgwidth)>System.Convert.ToInt32(imgheight))
{
System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(134,90, null, IntPtr.Zero);
thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg);
thumbImg.Dispose();
}
else
{
System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(103,113, null, IntPtr.Zero);
thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg);
thumbImg.Dispose();
}
coverImg.Dispose();
搜索一下N多