图片上传问题,这个问题比较有意思,求高手们指导! 判断上传的类型不就可以了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多 winfrom中上传图片 c# 正则表达式问题 C#窗体变形 正则表达式如何改为 关于C#的事件(你可以做出来吗?) 自动注册的原理是什么 请问C# 如何在MDI窗体中的子窗体上保留菜单和工具栏?不要合并到父窗体中 如何规范程序设计啊,比如什么功能应在那个页面实现,那些功能应在不同的页面实现。好像有个程序帮你来做这个事情的吧 高分求购Grid注册码. 怎么不让Button触发事件时不postback? 怎么编程设置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多